summaryrefslogtreecommitdiffstats
path: root/qmake-features
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2017-06-28 16:44:11 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2017-07-03 20:01:40 +0000
commit00bbb9a0a8f2ffd42d0c18dcb7ae826192ecec90 (patch)
tree7807dde69d8ae8a2007e4563535c59019edf41d5 /qmake-features
parentb151b82b981aeb7a918ff532db4871afe0078e8c (diff)
Made the external D-Bus interfaces a compile time option
Running qmake -config disable-external-dbus-interfaces will now compile out the support for all the external interfaces (ApplicationManager, WindowManager, ApplicationInstaller and NotificationManager). This also cleans up the implementation of these singletons, since we are now using a custom "2 step" DBus adaptor to get around the QtDBus limitation that requires the original object to derive from QDBusContext (although this violates every layering rule). In any case, this will not affect the private P2P Bus between the AM and the apps. Change-Id: I53d9c3b6d3a010ed7d65e3a80005bd18a7bb9c23 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'qmake-features')
-rw-r--r--qmake-features/am-config.prf1
-rw-r--r--qmake-features/dbus-adaptors-xml.prf20
2 files changed, 21 insertions, 0 deletions
diff --git a/qmake-features/am-config.prf b/qmake-features/am-config.prf
index bee02bb6..21c00df2 100644
--- a/qmake-features/am-config.prf
+++ b/qmake-features/am-config.prf
@@ -12,6 +12,7 @@ DEFINES += QT_MESSAGELOGCONTEXT
win32-msvc*:QMAKE_CXXFLAGS += /FS /wd4290 /DNOMINMAX /D_CRT_SECURE_NO_WARNINGS
disable-installer:DEFINES *= AM_DISABLE_INSTALLER
+disable-external-dbus-interfaces:DEFINES *= AM_DISABLE_EXTERNAL_DBUS_INTERFACES
systemd-workaround:DEFINES *= AM_SYSTEMD_WORKAROUND
headless:DEFINES *= AM_HEADLESS
linux:!android:!disable-libbacktrace:if(enable-libbacktrace|CONFIG(debug, debug|release)):DEFINES *= AM_USE_LIBBACKTRACE
diff --git a/qmake-features/dbus-adaptors-xml.prf b/qmake-features/dbus-adaptors-xml.prf
new file mode 100644
index 00000000..529954a6
--- /dev/null
+++ b/qmake-features/dbus-adaptors-xml.prf
@@ -0,0 +1,20 @@
+
+load(moc)
+qtPrepareTool(QDBUSXML2CPP, qdbusxml2cpp)
+
+adaptors_header.commands = $$QDBUSXML2CPP -i dbus-utilities.h -a ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
+adaptors_header.depends += $$QDBUSXML2CPP_EXE
+adaptors_header.output = ${QMAKE_FILE_BASE}_adaptor$${first(QMAKE_EXT_H)}
+adaptors_header.name = DBUS adaptor header for ${QMAKE_FILE_IN}
+adaptors_header.variable_out = dbus_adaptor_headers
+adaptors_header.input = ADAPTORS_XML
+adaptors_header.CONFIG += target_predep
+
+adaptors_moc.commands = $$moc_header.commands
+adaptors_moc.depends += $$QMAKE_MOC_EXE
+adaptors_moc.output = $$moc_header.output
+adaptors_moc.input = dbus_adaptor_headers
+adaptors_moc.variable_out = GENERATED_SOURCES
+adaptors_moc.name = DBUS adaptor MOC headers
+
+QMAKE_EXTRA_COMPILERS += adaptors_header adaptors_moc