diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index edc3cac7ba..e7e9a5bd87 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -116,29 +116,6 @@ c++11|c++14|c++1z { 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 QMAKE_INCDIR += $$QMAKE_INCDIR_POST diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf new file mode 100644 index 0000000000..41d959cf83 --- /dev/null +++ b/mkspecs/features/qmake_use.prf @@ -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" +} diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf index 090f348ebf..51ea3a8321 100644 --- a/mkspecs/features/spec_pre.prf +++ b/mkspecs/features/spec_pre.prf @@ -51,5 +51,5 @@ equals(QMAKE_HOST.os, Windows) { 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