diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-03 19:36:29 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-03 19:36:29 +0100 |
commit | 90d3044e3a6ad58819be6787b5edcbc9daa948dc (patch) | |
tree | 27d54322988fe60a420bbb058608b9b9d637329b /tools/qmake/mkspecs | |
parent | 03301c0fbdf034fb987e1c1ed1bec7c206dcd27e (diff) | |
parent | d0ae9b50cc01e4c0f65f17467276d4af40284ae1 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I052fdc4245e25e58457d51f6e49703bc7dd8ff00
Diffstat (limited to 'tools/qmake/mkspecs')
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index d5265ab00..2c75f4984 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -163,17 +163,30 @@ defineTest(use?) { } defineReplace(findOrBuildNinja) { - # 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 NINJA_PATH env var is set, prefer that. + # Fallback to locating our own bootstrapped ninja. + out = $(NINJA_PATH) + !exists($$out) { + src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") + + out = $$shadowed($$absolute_path("ninja/ninja", "$$src_3rd_party_dir")) + win32: out = $${out}.exe - # If we did not find ninja, then we bootstrap it. - !exists($$out): system("cd $$dirname(out) && python configure.py --bootstrap") + out = $$system_path($$out) + # If we did not find ninja, then we bootstrap it. + !exists($$out) { + # If we are making a shadow build, copy the ninja sources to the build directory. + !equals(PWD, $${OUT_PWD}) { + log("Build directory is different from source directory - copying ninja sources to the build tree...") + shadow_3rd_party_path = $$system_path($$shadowed($$src_3rd_party_dir)) + + !exists($$dirname(out)): mkpath($$shadow_3rd_party_path) + system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$shadow_3rd_party_path)") + } + system("cd $$system_quote($$dirname(out)) && python configure.py --bootstrap") } - return($$out) + } + return($$out) } defineTest(skipBuild) { |