summaryrefslogtreecommitdiffstats
path: root/tools/qmake
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-07 17:34:27 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-14 16:43:41 +0200
commit4be6a15559b0dfb7c53b72e2480ce8e09326b3c1 (patch)
tree86b9aa9d6c00935d79e545578876aec68c143610 /tools/qmake
parent3a30ed4ecc9c828641daef85f88f93baf78826b6 (diff)
Fix the build on windows when qtwebengine.chromiumsrcdir isn't set
qtwe_chromium_obj_dir wasn't falling back to src/3rdparty if the config couldn't be found in git. Move the fallback logic to a getChromiumSrcDir qmake function, and use it in both places. The build system will now also print that the Chromium sources will follow the git config if found instead of the other way around, since this should now be the normal case as part of Qt5. Change-Id: I5ab972ab53156c1bd033518e2eb51013559491ac Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tools/qmake')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index a4dbb6732..2db0c3ab1 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -18,6 +18,13 @@ defineReplace(getConfigDir) {
return("Debug")
}
+defineReplace(getChromiumSrcDir) {
+ git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
+ # Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used)
+ isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium"
+ return($$git_chromium_src_dir)
+}
+
defineReplace(extractCFlag) {
CFLAGS = $$QMAKE_CFLAGS
!isEmpty(ANDROID_TARGET_CFLAGS): CFLAGS = $$ANDROID_TARGET_CFLAGS
@@ -89,11 +96,7 @@ defineReplace(which) {
}
defineReplace(findOrBuildNinja) {
- git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
- # Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used)
- isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium"
-
- out = $$absolute_path("$$git_chromium_src_dir/../ninja/ninja", "$$QTWEBENGINE_ROOT")
+ out = $$absolute_path("$${getChromiumSrcDir()}/../ninja/ninja", "$$QTWEBENGINE_ROOT")
win32: out = $$system_path($${out}.exe)
# If we did not find ninja, then we bootstrap it.