summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_functions.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r--mkspecs/features/qt_functions.prf20
1 files changed, 20 insertions, 0 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index e40e56df20..58c35ddd41 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -184,6 +184,26 @@ defineTest(qtPrepareTool) {
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