summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-20 16:54:17 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-20 16:54:42 +0100
commit8a1fadd42dafb8abc54b7e9529f7db1200c643fa (patch)
tree2975b1546452d2a17fa4a7a4fe4e3ba2e327c591 /tools
parent1173d48149a8133b607894b67e1ec32de68e21e8 (diff)
parent5a8bae70bb6caf01c262ed3a607c736ea72561b9 (diff)
Merge remote-tracking branch 'origin/5.5' into 5.6
Diffstat (limited to 'tools')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf31
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) {