diff options
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 57 |
1 files changed, 39 insertions, 18 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 9ec22d57db..bbbb5d36a3 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -75,17 +75,17 @@ defineTest(qtAddModule) { } unset(LINKAGE) - mac { - contains(MODULE_CONFIG, lib_bundle) { + mac:contains(MODULE_CONFIG, lib_bundle) { FRAMEWORK_INCLUDE = $${MODULE_LIBS}/$${MODULE_NAME}.framework/Headers !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { INCLUDEPATH *= $$FRAMEWORK_INCLUDE - LINKAGE = -F$${MODULE_LIBS} - } else { - QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS} } + auto_use_privates|isEqual(2, UsePrivate): \ + INCLUDEPATH += \ + $$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION) \ + $$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION)/$$MODULE_NAME + QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS} LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX} - } } # Re-insert the major version in the library name (cf qtLibraryTarget above) @@ -189,9 +189,9 @@ defineTest(qtAddRpathLink) { export(QMAKE_RPATHLINKDIR) } -# variable, default +# variable, default, [suffix for variable for system() use] defineTest(qtPrepareTool) { - $$1 = $$eval(QT_TOOL.$${2}.command) + $$1 = $$eval(QT_TOOL.$${2}.binary) isEmpty($$1) { $$1 = $$[QT_HOST_BINS]/$$2 exists($$eval($$1).pl) { @@ -204,17 +204,26 @@ defineTest(qtPrepareTool) { $$1 = $$BUNDLENAME } } - $$1 = $$shell_path($$eval($$1)) } - export($$1) + !isEmpty(3) { + $$1$$3 = $$system_path($$eval($$1)) + qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system) + } + $$1 = $$shell_path($$eval($$1)) + qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) } +# target variable, list of env var names, [non-empty: prepare for system(), not make] defineTest(qtAddToolEnv) { + isEmpty(3): \ + ds = $$QMAKE_DIR_SEP + else: \ + ds = $$DIR_SEPARATOR for(env, 2) { value = $$eval($${env}.value) !isEmpty(value) { name = $$eval($${env}.name) - equals(QMAKE_DIR_SEP, /) { + equals(ds, /) { contains($${env}.CONFIG, prepend): infix = \${$$name:+:\$$$name} else: infix = val = "$$name=$$join(value, :)$$infix" @@ -224,20 +233,27 @@ defineTest(qtAddToolEnv) { else: infix = val = "(set $$name=$$join(value, ;)$$infix) &" } - contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g - else: val ~= s,\\\$,\$\$,g + isEmpty(3): !contains(TEMPLATE, vc.*) { + contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g + val ~= s,\\\$,\$\$,g + } $$1 = "$$val $$eval($$1)" } } export($$1) } +# target variable, dependency var name, [non-empty: prepare for system(), not make] defineTest(qtAddTargetEnv) { - deps = $$replace(QT, -private$, ) + deps = $$replace($$2, -private$, ) deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends") !isEmpty(deps) { - for(dep, deps): \ - deppath += $$shell_path($$eval(QT.$${dep}.libs)) + for(dep, deps) { + isEmpty(3): \ + deppath += $$shell_path($$eval(QT.$${dep}.libs)) + else: \ + deppath += $$system_path($$eval(QT.$${dep}.libs)) + } equals(QMAKE_HOST.os, Windows) { deppath.name = PATH } else:contains(QMAKE_HOST.os, Linux|FreeBSD) { @@ -256,13 +272,18 @@ defineTest(qtAddTargetEnv) { pluginpath.value = for(qmod, QMAKEMODULES) { qmod = $$section(qmod, /, 0, -3)/plugins - exists($$qmod): pluginpath.value += $$shell_path($$qmod) + exists($$qmod) { + isEmpty(3): \ + pluginpath.value += $$shell_path($$qmod) + else: \ + pluginpath.value += $$system_path($$qmod) + } } pluginpath.name = QT_PLUGIN_PATH QT_TOOL_ENV += deppath pluginpath } - qtAddToolEnv($$1, $$QT_TOOL_ENV) + qtAddToolEnv($$1, $$QT_TOOL_ENV, $$3) } defineReplace(pkgConfigExecutable) { |