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 cc141cc5c6 and fixes a build
failure on macOS.
Change-Id: I71dcbb7465ad13b0bf03579f51412c373125caba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
bb10
parent
0c498ef4ff
commit
0efe6fc90f
|
|
@ -60,18 +60,10 @@ set_source_files_properties(qdbusmarshaller.cpp
|
|||
extend_target(DBus CONDITION QT_FEATURE_dbus_linked
|
||||
DEFINES
|
||||
QT_LINKED_LIBDBUS
|
||||
PUBLIC_LIBRARIES # special case
|
||||
LIBRARIES
|
||||
dbus-1
|
||||
)
|
||||
|
||||
# begin special case:
|
||||
extend_target(DBus CONDITION NOT QT_FEATURE_dbus_linked
|
||||
PUBLIC_LIBRARIES
|
||||
dbus-1_nolink
|
||||
)
|
||||
# end special case:
|
||||
|
||||
|
||||
extend_target(DBus CONDITION WIN32
|
||||
LIBRARIES
|
||||
advapi32
|
||||
|
|
|
|||
|
|
@ -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:<TRUE>:
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -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:<TRUE>:
|
||||
# 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
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue