summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/qt_functions.prf17
1 files changed, 13 insertions, 4 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index ce32028138..e4d3b03dc8 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -35,6 +35,17 @@ defineTest(qtAddLibrary) {
error("No module matching library '$$1' found.")
}
+# target variable, flag source variable
+defineTest(qtProcessModuleFlags) {
+ for(flag, $$2) {
+ contains(flag, ^-.*): \
+ $$1 -= $$replace(flag, ^-, )
+ else: \
+ $$1 += $$flag
+ }
+ export($$1)
+}
+
# qt module, UsePrivate flag, libs variable
defineTest(qtAddModule) {
MODULE_NAME = $$eval(QT.$${1}.name)
@@ -43,8 +54,8 @@ defineTest(qtAddModule) {
MODULE_CONFIG = $$eval(QT.$${1}.module_config)
MODULE_MAJOR_VERSION = $$eval(QT.$${1}.MAJOR_VERSION)
- CONFIG += $$eval(QT.$${1}.CONFIG)
- DEFINES += $$eval(QT.$${1}.DEFINES)
+ qtProcessModuleFlags(CONFIG, QT.$${1}.CONFIG)
+ qtProcessModuleFlags(DEFINES, QT.$${1}.DEFINES)
MODULE_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
MODULE_LIBS -= $$QMAKE_DEFAULT_LIBDIRS
@@ -113,8 +124,6 @@ defineTest(qtAddModule) {
}
$$3 += $$LINKAGE
}
- export(CONFIG)
- export(DEFINES)
export($$3)
export(INCLUDEPATH)
export(QMAKE_FRAMEWORKPATH)