summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-06-25 22:06:09 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-06-27 11:45:52 +0200
commit2922ecedf8b10d1fa5cdb3c9547423ce49c77c43 (patch)
tree5f4b9243b8ff3b25365b2d1da3c6da12451abf3c /build
parentfd457dbf0beab6f6f7f87b5b30966e413c5feee4 (diff)
Add init-repository.py script.
Chromium is not using a regular git submodule based repository layout. Therefore some special tweaking is necessary. This script will take care of setting the correct submodule paths and references after cloning the qtwebengine repository. Further it also downloads and builds the ninja build tool. Change-Id: I999ef33cbdbe3bfaff88253bb543ba77f5b68fd7 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/gyp_qtwebengine8
-rw-r--r--build/qmake/mkspecs/features/default_pre.prf2
-rw-r--r--build/qmake/mkspecs/features/functions.prf3
3 files changed, 9 insertions, 4 deletions
diff --git a/build/gyp_qtwebengine b/build/gyp_qtwebengine
index fd68af853..df5a5d18a 100755
--- a/build/gyp_qtwebengine
+++ b/build/gyp_qtwebengine
@@ -6,7 +6,13 @@ import subprocess
import sys
qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
-chrome_src = os.path.abspath(os.environ.get('CHROMIUM_SRC_DIR')) # null-checked in build.pro
+chrome_src = os.environ.get('CHROMIUM_SRC_DIR')
+if chrome_src:
+ chrome_src = os.path.abspath(chrome_src)
+if not chrome_src or not os.path.isdir(chrome_src):
+ chrome_src = os.path.join(qtwebengine_src, 'chromium')
+ print 'CHROMIUM_SRC_DIR not set, falling back to ' + chrome_src
+
script_dir = os.path.abspath(os.path.join(chrome_src, 'build'))
if not os.path.isdir(script_dir):
print script_dir + " is not a valid directory"
diff --git a/build/qmake/mkspecs/features/default_pre.prf b/build/qmake/mkspecs/features/default_pre.prf
index a49ab6bbf..279965523 100644
--- a/build/qmake/mkspecs/features/default_pre.prf
+++ b/build/qmake/mkspecs/features/default_pre.prf
@@ -5,6 +5,6 @@ QTWEBENGINEPROCESS_NAME = QtWebEngineProcess
# Fetched from environment for now
CHROMIUM_SRC_DIR = $$(CHROMIUM_SRC_DIR)
-isEmpty(CHROMIUM_SRC_DIR):error("please set CHROMIUM_SRC_DIR")
+isEmpty(CHROMIUM_SRC_DIR): CHROMIUM_SRC_DIR=$QTWEBENGINE_ROOT/chromium
load(functions)
diff --git a/build/qmake/mkspecs/features/functions.prf b/build/qmake/mkspecs/features/functions.prf
index 48c23a7f4..8a3445170 100644
--- a/build/qmake/mkspecs/features/functions.prf
+++ b/build/qmake/mkspecs/features/functions.prf
@@ -47,8 +47,7 @@ defineReplace(findNinja) {
out = $$system("which ninja 2>/dev/null")
# Try to be smart about it if we know where the chromium sources are located
isEmpty(CHROMIUM_SRC_DIR): message(foobar)
- !exists($$out):!isEmpty(CHROMIUM_SRC_DIR): out = $$absolute_path("../depot_tools/ninja", $$CHROMIUM_SRC_DIR)
- !exists($$out): error("Ninja executable can't be found.")
+ !exists($$out): out = $$absolute_path("$$QTWEBENGINE_ROOT/build/ninja/ninja")
cache(CACHED_NINJA_EXECUTABLE, set, out)
return($$out)
}