summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/functions.prf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-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)
}