make it possible to put removals into modules' .CONFIG and .DEFINES
the respective flags/defines need to be prefixed with a minus sign. Change-Id: I8a3a46254f90d4ecdbd692a0eca635038691d078 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
486261f40c
commit
f1841d864d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user