summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)