From 0efe6fc90fe964b8be20ca2046e3bfe7a394f3f7 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 7 May 2019 19:46:57 +0200 Subject: Don't link against dbus-1_nolink when dbus_linked feature is off dbus1_linked is only evaluated to true when the dbus package is found. If it was not found, then it makes no sense to link against the _nolink target, because no package was found in the first place. When the package is not found, QtDBus uses a minimal dbus header which is included with QtDBus sources, so there is no need for the _nolink target. This amends cc141cc5c61d086d6938e2c7312ec02e5f79734c and fixes a build failure on macOS. Change-Id: I71dcbb7465ad13b0bf03579f51412c373125caba Reviewed-by: Tobias Hunger --- tests/auto/dbus/qdbusinterface/CMakeLists.txt | 17 ++++++++++++++++- tests/auto/dbus/qdbustype/CMakeLists.txt | 24 ++++++++++++++++-------- 2 files changed, 32 insertions(+), 9 deletions(-) (limited to 'tests/auto/dbus') diff --git a/tests/auto/dbus/qdbusinterface/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/CMakeLists.txt index bb1debd590..c96944cd56 100644 --- a/tests/auto/dbus/qdbusinterface/CMakeLists.txt +++ b/tests/auto/dbus/qdbusinterface/CMakeLists.txt @@ -1,26 +1,41 @@ # Generated from qdbusinterface.pro. +# special case begin add_subdirectory(qmyserver) +##################################################################### +## ../tst_qdbusinterface Test: +##################################################################### + add_qt_test(tst_qdbusinterface SOURCES myobject.h tst_qdbusinterface.cpp LIBRARIES Qt::CorePrivate - Qt::DBus Qt::DBusPrivate + PUBLIC_LIBRARIES + Qt::Core + Qt::DBus ) +#### Keys ignored in scope 1:.:.:qdbusinterface.pro:: +# CONFIG = "testcase" +# DESTDIR = "./" + ## Scopes: ##################################################################### extend_target(tst_qdbusinterface CONDITION QT_FEATURE_dbus_linked DEFINES QT_LINKED_LIBDBUS + PUBLIC_LIBRARIES + dbus-1 ) extend_target(tst_qdbusinterface CONDITION NOT QT_FEATURE_dbus_linked SOURCES ../../../../src/dbus/qdbus_symbols.cpp ) + +# special case end diff --git a/tests/auto/dbus/qdbustype/CMakeLists.txt b/tests/auto/dbus/qdbustype/CMakeLists.txt index c76f44ba02..fc0c014a07 100644 --- a/tests/auto/dbus/qdbustype/CMakeLists.txt +++ b/tests/auto/dbus/qdbustype/CMakeLists.txt @@ -10,17 +10,25 @@ add_qt_test(tst_qdbustype LIBRARIES Qt::CorePrivate Qt::DBusPrivate + PUBLIC_LIBRARIES + Qt::Core + Qt::DBus ) +#### Keys ignored in scope 1:.:.:qdbustype.pro:: +# CONFIG = "testcase" "parallel_test" + ## Scopes: ##################################################################### -extend_target(tst_qdbustype CONDITION QT_FEATURE_dbus_linked - DEFINES - QT_LINKED_LIBDBUS -) + extend_target(tst_qdbustype CONDITION QT_FEATURE_dbus_linked + DEFINES + QT_LINKED_LIBDBUS + LIBRARIES + dbus-1 + ) -extend_target(tst_qdbustype CONDITION NOT QT_FEATURE_dbus_linked - SOURCES - ../../../../src/dbus/qdbus_symbols.cpp -) + extend_target(tst_qdbustype CONDITION NOT QT_FEATURE_dbus_linked + SOURCES + ../../../../src/dbus/qdbus_symbols.cpp + ) -- cgit v1.2.3