diff options
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 7777e615bd..dd780ad556 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -83,11 +83,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 +131,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): \ |