path: root/
diff options
authorPierre Rossi <>2013-06-14 16:42:39 +0200
committerJocelyn Turcotte <>2013-06-14 18:26:31 +0200
commit8fd262f1022990abb29b1523b612048fb13822b9 (patch)
treeec4fde9ff32f1586bde83aa5aa1ce169518ce4de /
parent164650cd970a1884a758092b9a47c1639cbb96a2 (diff)
Make ninja detection a bit more robust
Having ninja in the PATH should be good enough. If that didn't work, we try to find it in the most logical location relative to CHROMIUM_SRC_DIR and bail out otherwise. Since it seems unlikely to vary, and can be convenient to keep persistent, we put it in .qmake.cache if qmake uses a cache.
Diffstat (limited to '')
1 files changed, 5 insertions, 2 deletions
diff --git a/ b/
index 69bac5798..c08945a44 100644
--- a/
+++ b/
@@ -10,13 +10,16 @@ SUBDIRS = shared \
build \ # This is where we use the generated qt_generated.gypi and run gyp
example \
+# Ninja executable location needs to be determined early for extra targets. Should be fetched from cache most of the time anyway.
+NINJA_EXECUTABLE = $$findNinja()
# Extra targets that invoke ninja on the desired configuration added for convenience = release
-release.commands = $$CHROMIUM_SRC_DIR/../depot_tools/ninja -C $$getOutDir()/Release
+release.commands = $$NINJA_EXECUTABLE -C $$getOutDir()/Release
release.depends: qmake = debug
-debug.commands = $$CHROMIUM_SRC_DIR/../depot_tools/ninja -C $$getOutDir()/Debug
+debug.commands = $$NINJA_EXECUTABLE -C $$getOutDir()/Debug
debug.depends: qmake