diff options
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 54641ce5a1..efbf2fab1d 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -1,10 +1,6 @@ defineReplace(qtPlatformTargetSuffix) { - ios:CONFIG(simulator, simulator|device): \ - suffix = _$${simulator.sdk} - else: \ - suffix = - + suffix = CONFIG(debug, debug|release) { !debug_and_release|build_pass { mac: return($${suffix}_debug) @@ -16,7 +12,7 @@ defineReplace(qtPlatformTargetSuffix) { defineReplace(qtLibraryTarget) { LIBRARY_NAME = $$1 - CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { + CONFIG(shared, static|shared):qtConfig(framework) { QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME export(QMAKE_FRAMEWORK_BUNDLE_NAME) } @@ -171,7 +167,7 @@ defineTest(qtAddToolEnv) { "EndLocal" $$1 = call } - !build_pass:!write_file($$OUT_PWD/$$batch_name, batch_cont, exe): error("Aborting.") + !build_pass:!write_file($$OUT_PWD/$$batch_name, batch_cont, exe): error() isEmpty(3): \ $$1 += $$shell_quote($$shell_path($$OUT_PWD/$$batch_name)) else: \ @@ -196,7 +192,7 @@ defineTest(qtAddTargetEnv) { } else:contains(QMAKE_HOST.os, Haiku) { deppath.name = LIBRARY_PATH } else:equals(QMAKE_HOST.os, Darwin) { - contains(QT_CONFIG, qt_framework): \ + qtConfig(framework): \ deppath.name = DYLD_FRAMEWORK_PATH else: \ deppath.name = DYLD_LIBRARY_PATH @@ -259,7 +255,7 @@ defineReplace(pkgConfigExecutable) { } defineTest(packagesExist) { - contains(QT_CONFIG, no-pkg-config) { + !qtConfig(pkg-config) { warning("pkg-config disabled, can't check package existence") return(false) } @@ -302,3 +298,18 @@ defineTest(prepareRecursiveTarget) { export($${target}.CONFIG) export($${target}.recurse_target) } + +defineTest(qtConfig) { + modules = $$QT $$QT_PRIVATE $$QT_FOR_CONFIG + modules ~= s,-private$,_private,g + modules = $$resolve_depends(modules, "QT.", ".depends") + modules += global global_private + modules = $$reverse(modules) + for (module, modules) { + contains(QT.$${module}.enabled_features, $$1): \ + return(true) + contains(QT.$${module}.disabled_features, $$1): \ + return(false) + } + error("Could not find feature $${1}.") +} |