export($$1)
}
+defineTest(qtAddToolEnv) {
+ for(env, 2) {
+ value = $$eval($${env}.value)
+ !isEmpty(value) {
+ name = $$eval($${env}.name)
+ equals(QMAKE_DIR_SEP, /) {
+ contains($${env}.CONFIG, prepend): infix = \${$$name:+:\$$$name}
+ else: infix =
+ $$1 = "$$name=$$join(value, :)$$infix $$eval($$1)"
+ } else {
+ # Escape closing parens when expanding the variable, otherwise cmd confuses itself.
+ contains($${env}.CONFIG, prepend): infix = ;%$$name:)=^)%
+ else: infix =
+ $$1 = "(set $$name=$$join(value, ;)$$infix) & $$eval($$1)"
+ }
+ }
+ }
+ export($$1)
+}
+
defineReplace(pkgConfigExecutable) {
isEmpty(PKG_CONFIG) {
PKG_CONFIG = pkg-config
QT_TOOL_ENV += deppath pluginpath
}
- for(env, QT_TOOL_ENV) {
- value = $$eval($${env}.value)
- !isEmpty(value) {
- name = $$eval($${env}.name)
- equals(QMAKE_DIR_SEP, /) {
- contains($${env}.CONFIG, prepend): infix = \${$$name:+:\$$$name}
- else: infix =
- cmd = "$$name=$$join(value, :)$$infix $$cmd"
- } else {
- # Escape closing parens when expanding the variable, otherwise cmd confuses itself.
- contains($${env}.CONFIG, prepend): infix = ;%$$name:)=^)%
- else: infix =
- cmd = "(set $$name=$$join(value, ;)$$infix) & $$cmd"
- }
- }
- }
+ qtAddToolEnv(cmd, $$QT_TOOL_ENV)
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_$${MODULE}.pri