summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_functions.prf
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-09-13 18:13:13 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-18 00:59:08 +0200
commit321687f03b25e71ee7be7bed35a8e615dcb7f381 (patch)
treef30814abdcc809f46ac2f6d5272f39ca67132264 /mkspecs/features/qt_functions.prf
parentfb8a6297f416e0367bbe0011e9b0ac52a6d7748d (diff)
factor out qtAddToolEnv()
so it's available for other users as well Change-Id: I2d5a14ae427575c07321ac532b13ee03308b837f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
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