summaryrefslogtreecommitdiffstats
path: root/configure.pri
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-12-19 16:36:36 -0800
committerMichael Forney <mforney@mforney.org>2020-01-22 23:54:34 -0800
commit8412b9b3442345b17fe6618a56ed9ed08dfb7417 (patch)
tree3d330fe9cc77f43c9216ad9dc32613e013d66f8d /configure.pri
parent46df03dc0f76628f569d63c08cc42f2e20062672 (diff)
Allow specifying ninja command to use with $NINJA
This was previously supported with $NINJA_PATH until 15a38cb0, when the system-ninja test was added. However, since $NINJA seems to be the more common environment variable for this purpose, use that instead. This allows the builder to use a specific ninja version, or an alternative implementation like samurai[0]. [0] https://github.com/michaelforney/samurai Change-Id: Ib3206ce5032be1ccf2a98b45783e12afebb4949e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'configure.pri')
-rw-r--r--configure.pri10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.pri b/configure.pri
index 3a144e3f8..f1c25fbe1 100644
--- a/configure.pri
+++ b/configure.pri
@@ -159,11 +159,17 @@ defineTest(qtConfTest_detectFlex) {
}
defineTest(qtConfTest_detectNinja) {
- ninja = $$qtConfFindInPath("ninja$$EXE_SUFFIX")
+ ninja = $$qtConfFindInPath($$(NINJA) "ninja$$EXE_SUFFIX")
!isEmpty(ninja) {
qtLog("Found ninja from path: $$ninja")
qtRunLoggedCommand("$$ninja --version", version)|return(false)
- contains(version, "1.[7-9].*"): return(true)
+ contains(version, "1.[7-9].*") {
+ $${1}.path = $$ninja
+ export($${1}.path)
+ $${1}.cache += path
+ export($${1}.cache)
+ return(true)
+ }
qtLog("Ninja version too old")
}
qtLog("Building own ninja")