diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-10 18:25:32 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-22 07:46:59 +0000 |
commit | fcf0aee044fbec46170308ee3396c472d7a8705f (patch) | |
tree | 20ef0a443a22af98ea99b8d77618842b457456ff /mkspecs/features | |
parent | 52b260fb0fc3342022e0f71120040fdc4429cd25 (diff) |
configure: make it possible to make 'use' conditional
Change-Id: I8390634c5b23bf34692b4f532ab00a7aba690037
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/qt_configure.prf | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index b5624d276e..921ffa244d 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -751,7 +751,20 @@ defineTest(qtConfTest_library) { } defineTest(qtConfTestPrepare_compile) { - for (u, $$list($$eval($${1}.use))) { + !isEmpty($${1}.use._KEYS_) { + uses = + for (k, $${1}.use._KEYS_) { + use = $$eval($${1}.use.$${k}.lib) + isEmpty(use): \ + error("'use' entry $$k in test $$1 lacks 'lib' field.") + !$$qtConfEvaluate($$eval($${1}.use.$${k}.condition)): \ + next() + uses += $$use + } + } else { + uses = $$split($${1}.use) + } + for (u, uses) { libConfig = exports = $$eval($${currentConfig}.exports.$$u) !isEmpty(exports) { |