Skip to content

Commit 87a8400

Browse files
mattfischerThe Qt Project
authored and
The Qt Project
committed
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 <[email protected]> (cherry-picked from qtbase/c82b0815ec80b3750a110d47c68142bb448ddf56) Reviewed-by: Oswald Buddenhagen <[email protected]>
1 parent c1d70d1 commit 87a8400

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/dbus/dbus.pro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ CONFIG += link_pkgconfig
66
DEFINES += QT_BUILD_DBUS_LIB \
77
DBUS_API_SUBJECT_TO_CHANGE
88
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
9+
10+
isEmpty(QT_LIBS_DBUS) {
11+
win32:CONFIG(debug, debug|release):QT_LIBS_DBUS += -ldbus-1d
12+
else:QT_LIBS_DBUS += -ldbus-1
13+
}
14+
915
contains(QT_CONFIG, dbus-linked) {
1016
LIBS_PRIVATE += $$QT_LIBS_DBUS
1117
DEFINES += QT_LINKED_LIBDBUS
@@ -25,8 +31,6 @@ win32 {
2531
-ladvapi32 \
2632
-lnetapi32 \
2733
-luser32
28-
CONFIG(debug, debug|release):LIBS_PRIVATE += -ldbus-1d
29-
else:LIBS_PRIVATE += -ldbus-1
3034
}
3135
include(../qbase.pri)
3236
PUB_HEADERS = qdbusargument.h \

0 commit comments

Comments
 (0)