From 87a840080732727c3017084a3fe8eb5acd30a746 Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Thu, 28 Feb 2013 10:52:12 -0600 Subject: Fixed -dbus-linked when cross-compiling from Windows Since Windows doesn't have pkg-config, it doesn't get -ldbus-1 added to the command line automatically like Linux does. Code was present to deal with this case, however it was only configured to work when native-compiling Qt. The flag was not added when cross-compiling, meaning that -dbus-linked did not work correctly in that case. This patch changes the code to add the flag properly in both cases. Change-Id: I67881643bd658161f4929f3932859ccf636ca7a9 Task-number: QTBUG-29984 Reviewed-by: Thiago Macieira (cherry-picked from qtbase/c82b0815ec80b3750a110d47c68142bb448ddf56) Reviewed-by: Oswald Buddenhagen --- src/dbus/dbus.pro | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro index 37e592562b..56527ad14e 100644 --- a/src/dbus/dbus.pro +++ b/src/dbus/dbus.pro @@ -6,6 +6,12 @@ CONFIG += link_pkgconfig DEFINES += QT_BUILD_DBUS_LIB \ DBUS_API_SUBJECT_TO_CHANGE QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS + +isEmpty(QT_LIBS_DBUS) { + win32:CONFIG(debug, debug|release):QT_LIBS_DBUS += -ldbus-1d + else:QT_LIBS_DBUS += -ldbus-1 +} + contains(QT_CONFIG, dbus-linked) { LIBS_PRIVATE += $$QT_LIBS_DBUS DEFINES += QT_LINKED_LIBDBUS @@ -25,8 +31,6 @@ win32 { -ladvapi32 \ -lnetapi32 \ -luser32 - CONFIG(debug, debug|release):LIBS_PRIVATE += -ldbus-1d - else:LIBS_PRIVATE += -ldbus-1 } include(../qbase.pri) PUB_HEADERS = qdbusargument.h \ -- cgit v1.2.3