From af5a72743e3d744b6b5cc53c3f61b8566b7c0920 Mon Sep 17 00:00:00 2001 From: Jarred Nicholls Date: Wed, 15 Oct 2014 15:37:08 -0400 Subject: 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 --- tools/qmake/mkspecs/features/functions.prf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tools') 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) } -- cgit v1.2.3