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.prf29
1 files changed, 25 insertions, 4 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 7777e615bd..f1371c8cc6 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -1,9 +1,13 @@
defineReplace(qtPlatformTargetSuffix) {
+ config_variable = $$1
+ isEmpty(config_variable): \
+ config_variable = CONFIG
+
suffix =
android: return($${suffix}_$${QT_ARCH})
win32 {
- CONFIG(debug, debug|release) {
+ contains($$config_variable, debug, debug|release) {
mingw {
qtConfig(debug_and_release):build_pass: \
return($${suffix}d)
@@ -14,7 +18,7 @@ defineReplace(qtPlatformTargetSuffix) {
}
}
darwin {
- CONFIG(debug, debug|release) {
+ contains($$config_variable, debug, debug|release) {
!debug_and_release|build_pass: \
return($${suffix}_debug)
}
@@ -83,11 +87,19 @@ defineTest(qtHaveModule) {
return(false)
}
-# variable, default, [suffix for variable for system() use], [prepare primary variable for system() use]
+# Arguments:
+# variable, default, [suffix for variable for system() use],
+# [prepare primary variable for system() use],
+# [installation location; default: $$[QT_HOST_BINS]]
defineTest(qtPrepareTool) {
cmd = $$eval(QT_TOOL.$${2}.binary)
isEmpty(cmd) {
- cmd = $$[QT_HOST_BINS]/$$2
+ isEmpty(5) {
+ instloc = $$[QT_HOST_BINS]
+ } else {
+ instloc = $$5
+ }
+ cmd = $$instloc/$$2
exists($${cmd}.pl) {
$${1}_EXE = $${cmd}.pl
cmd = perl -w $$system_path($${cmd}.pl)
@@ -123,6 +135,15 @@ defineTest(qtPrepareTool) {
}
}
+# Prepare a tool that's not supposed to be called manually by users but by the build system.
+#
+# Forwards its arguments to qtPrepareTool but defaults the installation location to
+# $$[QT_HOST_LIBEXECS]
+defineTest(qtPrepareLibExecTool) {
+ isEmpty(instloc): instloc = "$$[QT_HOST_LIBEXECS]"
+ qtPrepareTool($$1, $$2, $$3, $$4, $$instloc)
+}
+
# target variable, list of env var names, [non-empty: prepare for system(), not make]
defineTest(qtAddToolEnv) {
isEmpty(3): \