summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2016-01-07 23:39:33 +0100
committerJavier <dev.git@javispedro.com>2016-01-07 23:39:33 +0100
commit87a7e79f3306558176c97a9f82c63949bbf214c7 (patch)
treef62de964fc8cec58b7419ff35e370542f4a728e0
parent41677b58d971ab57a79514d972f10acb04797130 (diff)
downloadlibwatchfish-87a7e79f3306558176c97a9f82c63949bbf214c7.tar.gz
libwatchfish-87a7e79f3306558176c97a9f82c63949bbf214c7.zip
add .pri file to ease inclusion
-rw-r--r--libwatchfish.pri19
-rw-r--r--libwatchfish.pro13
2 files changed, 21 insertions, 11 deletions
diff --git a/libwatchfish.pri b/libwatchfish.pri
new file mode 100644
index 0000000..eb1fb7d
--- /dev/null
+++ b/libwatchfish.pri
@@ -0,0 +1,19 @@
+CONFIG += link_pkgconfig
+
+contains(WATCHFISH_FEATURES, notificationmonitor) {
+ PKGCONFIG += dbus-1
+ HEADERS += $$PWD/notificationmonitor.h $$PWD/notificationmonitor_p.h $$PWD/notification.h
+ SOURCES += $$PWD/notificationmonitor.cpp $$PWD/notification.cpp
+}
+
+contains(WATCHFISH_FEATURES, walltime) {
+ PKGCONFIG += timed-qt5
+ HEADERS += $$PWD/walltimemonitor.h $$PWD/walltimemonitor_p.h
+ SOURCES += $$PWD/walltimemonitor.cpp
+}
+
+contains(WATCHFISH_FEATURES, music) {
+ PKGCONFIG += mpris-qt5
+ HEADERS += $$PWD/musiccontroller.h $$PWD/musiccontroller_p.h
+ SOURCES += $$PWD/musiccontroller.cpp
+}
diff --git a/libwatchfish.pro b/libwatchfish.pro
index 77bb26a..8935a77 100644
--- a/libwatchfish.pro
+++ b/libwatchfish.pro
@@ -4,14 +4,5 @@ TEMPLATE = lib
CONFIG += staticlib
QT += dbus
-CONFIG += link_pkgconfig
-PKGCONFIG += dbus-1 timed-qt5
-
-HEADERS = notificationmonitor.h notificationmonitor_p.h notification.h \
- walltimemonitor.h walltimemonitor_p.h \
- musiccontroller.h \
- musiccontroller_p.h
-
-SOURCES = notificationmonitor.cpp notification.cpp \
- walltimemonitor.cpp \
- musiccontroller.cpp
+WATCHFISH_FEATURES = notificationmonitor walltime music
+include(libwatchfish.pri)