Commit be550a2b authored by Andras Becsi's avatar Andras Becsi Committed by The Qt Project
Browse files

Rename findNinja to findOrBuildNinja and fail early if gyp fails


We should not not use the $$ syntax to collect the output of the gyp
call instead we should just fail with an error in case gyp_qtwebengine
fails.

Change-Id: Ib6218bdfb998100a3717470713ed5bf5f30db339
Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
parent f2540f32
No related merge requests found
Showing with 4 additions and 5 deletions
......@@ -5,11 +5,10 @@
TEMPLATE = aux
message(Running Gyp...)
GYP_OUTPUT = $$system(python ./gyp_qtwebengine)
message($$GYP_OUTPUT)
!system(python ./gyp_qtwebengine): error("-- running gyp_qtwebengine failed --")
ninja.target = invoke_ninja
ninja.commands = $$findNinja() $$(NINJAFLAGS) -C $$getOutDir()/$$getConfigDir()
ninja.commands = $$findOrBuildNinja() $$(NINJAFLAGS) -C $$getOutDir()/$$getConfigDir()
ninja.depends: qmake
QMAKE_EXTRA_TARGETS += ninja
......
......@@ -71,7 +71,7 @@ defineReplace(which) {
return($$out)
}
defineReplace(findNinja) {
defineReplace(findOrBuildNinja) {
!isEmpty(CACHED_NINJA_EXECUTABLE):exists($$CACHED_NINJA_EXECUTABLE): return($$CACHED_NINJA_EXECUTABLE)
out = $$which(ninja)
# Try to be smart about it if we know where the chromium sources are located
......
......@@ -22,7 +22,7 @@ qtHaveModule(widgets) {
SUBDIRS += examples
# Ninja executable location needs to be determined early for extra targets. Should be fetched from cache most of the time anyway.
NINJA_EXECUTABLE = $$findNinja()
NINJA_EXECUTABLE = $$findOrBuildNinja()
# Extra targets that invoke ninja on the desired configuration added for convenience
release.target = release
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment