summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/qt.prf9
-rw-r--r--mkspecs/features/qt_functions.prf8
2 files changed, 13 insertions, 4 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index d8a8627d83..3c4b284b68 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -156,13 +156,18 @@ import_plugins {
# the plugin path. Unknown plugins must rely on the default link path.
plug_type = $$eval(QT_PLUGIN.$${plug}.TYPE)
!isEmpty(plug_type) {
- plug_name = $$QMAKE_PREFIX_STATICLIB$${plug}$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
+ # Respect target config if Qt provides both debug and release versions
+ # of each plugin. Otherwise, respect what Qt was configured with.
+ qtConfig(debug_and_release): config_variable = CONFIG
+ else: config_variable = QT_CONFIG
+
+ plug_name = $$QMAKE_PREFIX_STATICLIB$${plug}$$qtPlatformTargetSuffix($$config_variable).$$QMAKE_EXTENSION_STATICLIB
plug_path = $$eval(QT_PLUGIN.$${plug}.PATH)
isEmpty(plug_path): \
plug_path = $$[QT_INSTALL_PLUGINS/get]
LIBS += $$plug_path/$$plug_type/$$plug_name
} else {
- LIBS += -l$${plug}$$qtPlatformTargetSuffix()
+ LIBS += -l$${plug}$$qtPlatformTargetSuffix(CONFIG)
}
}
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index dd780ad556..f1371c8cc6 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -1,9 +1,13 @@
defineReplace(qtPlatformTargetSuffix) {
+ config_variable = $$1
+ isEmpty(config_variable): \
+ config_variable = CONFIG
+
suffix =
android: return($${suffix}_$${QT_ARCH})
win32 {
- CONFIG(debug, debug|release) {
+ contains($$config_variable, debug, debug|release) {
mingw {
qtConfig(debug_and_release):build_pass: \
return($${suffix}d)
@@ -14,7 +18,7 @@ defineReplace(qtPlatformTargetSuffix) {
}
}
darwin {
- CONFIG(debug, debug|release) {
+ contains($$config_variable, debug, debug|release) {
!debug_and_release|build_pass: \
return($${suffix}_debug)
}