factor out QMAKE_USE* processing to a separate prf file
this makes it possible for features added via CONFIG to use QMAKE_USE*, as default_post.prf is processed before all features in CONFIG. Change-Id: Id0812a0fb1aa5e658548bd2bc6003234085545e7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
0059bf944d
commit
1e97037ed9
@ -116,29 +116,6 @@ c++11|c++14|c++1z {
|
|||||||
unset(cxxstd)
|
unset(cxxstd)
|
||||||
}
|
}
|
||||||
|
|
||||||
suffix =
|
|
||||||
for(ever) {
|
|
||||||
QMAKE_USE$${suffix} = $$unique(QMAKE_USE$${suffix})
|
|
||||||
for(name, QMAKE_USE$${suffix}) {
|
|
||||||
nu = $$upper($$name)
|
|
||||||
CONFIG(debug, debug|release): \
|
|
||||||
libs = $$eval(QMAKE_LIBS_$${nu}_DEBUG)
|
|
||||||
else: \
|
|
||||||
libs = $$eval(QMAKE_LIBS_$${nu}_RELEASE)
|
|
||||||
libs += $$eval(QMAKE_LIBS_$$nu)
|
|
||||||
cflags = $$eval(QMAKE_CFLAGS_$${nu})
|
|
||||||
|
|
||||||
isEmpty(libs):isEmpty(cflags): \
|
|
||||||
error("Library '$$name' is not defined.")
|
|
||||||
|
|
||||||
LIBS$${suffix} += $$libs
|
|
||||||
QMAKE_CFLAGS += $$cflags
|
|
||||||
QMAKE_CXXFLAGS += $$cflags
|
|
||||||
}
|
|
||||||
!isEmpty(suffix): break()
|
|
||||||
suffix = "_PRIVATE"
|
|
||||||
}
|
|
||||||
|
|
||||||
!precompile_header: SOURCES += $$NO_PCH_SOURCES
|
!precompile_header: SOURCES += $$NO_PCH_SOURCES
|
||||||
|
|
||||||
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
|
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
|
||||||
|
22
mkspecs/features/qmake_use.prf
Normal file
22
mkspecs/features/qmake_use.prf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
suffix =
|
||||||
|
for(ever) {
|
||||||
|
QMAKE_USE$${suffix} = $$unique(QMAKE_USE$${suffix})
|
||||||
|
for (name, QMAKE_USE$${suffix}) {
|
||||||
|
nu = $$upper($$name)
|
||||||
|
debug: \
|
||||||
|
libs = $$eval(QMAKE_LIBS_$${nu}_DEBUG)
|
||||||
|
else: \
|
||||||
|
libs = $$eval(QMAKE_LIBS_$${nu}_RELEASE)
|
||||||
|
libs += $$eval(QMAKE_LIBS_$$nu)
|
||||||
|
cflags = $$eval(QMAKE_CFLAGS_$${nu})
|
||||||
|
|
||||||
|
isEmpty(libs):isEmpty(cflags): \
|
||||||
|
error("Library '$$name' is not defined.")
|
||||||
|
|
||||||
|
LIBS$${suffix} += $$libs
|
||||||
|
QMAKE_CFLAGS += $$cflags
|
||||||
|
QMAKE_CXXFLAGS += $$cflags
|
||||||
|
}
|
||||||
|
!isEmpty(suffix): break()
|
||||||
|
suffix = "_PRIVATE"
|
||||||
|
}
|
@ -51,5 +51,5 @@ equals(QMAKE_HOST.os, Windows) {
|
|||||||
QMAKE_SH = sh
|
QMAKE_SH = sh
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG = file_copies qt warn_on release link_prl
|
CONFIG = file_copies qmake_use qt warn_on release link_prl
|
||||||
QT = core gui
|
QT = core gui
|
||||||
|
Loading…
Reference in New Issue
Block a user