summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJarred Nicholls <jarred.nicholls@gmail.com>2014-10-15 15:37:08 -0400
committerJarred Nicholls <jarred.nicholls@gmail.com>2014-10-16 14:36:30 +0200
commitaf5a72743e3d744b6b5cc53c3f61b8566b7c0920 (patch)
treea818318b7ab4e0e0fcb122abc5ded049be697351 /tools
parentdca4a72fa04f0c50cede0d4f5f56791cd6722b74 (diff)
Look for the NINJA_PATH env var and prefer that over the bootstrapped ninja
The snapshot ninja may cause issues in some environments, where a different ninja version may work. If the user has NINJA_PATH set in their environment, prefer that over bootstrapping our own. Change-Id: I4c6d2f479aeae1f5137705ed2deb995b59ea287a Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index f0ee05144..02c387273 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -105,10 +105,15 @@ defineReplace(which) {
}
defineReplace(findOrBuildNinja) {
- out = $$absolute_path("$${getChromiumSrcDir()}/../ninja/ninja", "$$QTWEBENGINE_ROOT")
- win32: out = $$system_path($${out}.exe)
+ # If NINJA_PATH env var is set, prefer that.
+ # Fallback to locating our own bootstrapped ninja.
+ out = $(NINJA_PATH)
+ !exists($$out) {
+ out = $$absolute_path("$${getChromiumSrcDir()}/../ninja/ninja", "$$QTWEBENGINE_ROOT")
+ win32: out = $$system_path($${out}.exe)
- # If we did not find ninja, then we bootstrap it.
- !exists($$out): system("python $$dirname(out)/bootstrap.py")
+ # If we did not find ninja, then we bootstrap it.
+ !exists($$out): system("python $$dirname(out)/bootstrap.py")
+ }
return($$out)
}