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 <thiago.macieira@intel.com>
This commit is contained in:
Matt Fischer 2013-02-28 10:52:12 -06:00 committed by The Qt Project
parent 84a1493b50
commit c82b0815ec

View File

@ -6,6 +6,8 @@ MODULE_CONFIG = dbusadaptors dbusinterfaces
!isEmpty(DBUS_PATH) {
INCLUDEPATH += $$DBUS_PATH/include
QMAKE_LIBDIR += $$DBUS_PATH/lib
win32:CONFIG(debug, debug|release):QT_LIBS_DBUS += -ldbus-1d
else:QT_LIBS_DBUS += -ldbus-1
}
DEFINES += DBUS_API_SUBJECT_TO_CHANGE
@ -21,8 +23,6 @@ win32 {
-ladvapi32 \
-lnetapi32 \
-luser32
CONFIG(debug, debug|release):LIBS_PRIVATE += -ldbus-1d
else:LIBS_PRIVATE += -ldbus-1
}
QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf