summaryrefslogtreecommitdiffstats
path: root/src/core/gyp_run.pro
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gyp_run.pro')
-rw-r--r--src/core/gyp_run.pro61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
new file mode 100644
index 000000000..e0c8b4af1
--- /dev/null
+++ b/src/core/gyp_run.pro
@@ -0,0 +1,61 @@
+# This .pro file serves a dual purpose:
+# 1) invoking gyp through the gyp_qtwebengine script, which in turn makes use of the generated gypi include files
+# 2) produce a Makefile that will run ninja, and take care of actually building everything.
+
+TEMPLATE = aux
+
+GYP_ARGS = "-D qt_cross_compile=0"
+cross_compile {
+ GYP_ARGS = "-D qt_cross_compile=1 -D os_posix=1"
+ TOOLCHAIN_SYSROOT = $$[QT_SYSROOT]
+ !isEmpty(TOOLCHAIN_SYSROOT): GYP_ARGS += "-D sysroot=\"$${TOOLCHAIN_SYSROOT}\""
+
+ contains(QT_ARCH, "arm") {
+ GYP_ARGS += "-D target_arch=arm"
+
+ # Extract ARM specific compiler options that we have to pass to gyp,
+ # but let gyp figure out a default if an option is not present.
+ MARCH = $$extractCFlag("-march=.*")
+ !isEmpty(MARCH): GYP_ARGS += "-D arm_arch=\"$$MARCH\""
+
+ MFPU = $$extractCFlag("-mfpu=.*")
+ !isEmpty(MFPU) {
+ GYP_ARGS += "-D arm_fpu=\"$$MFPU\""
+ contains(MFPU, "neon"): GYP_ARGS += "-D arm_neon=\"$$NEON\""
+ }
+
+ MTUNE = $$extractCFlag("-mtune=.*")
+ !isEmpty(MTUNE): GYP_ARGS += "-D arm_tune=\"$$MTUNE\""
+
+ MFLOAT = $$extractCFlag("-mfloat-abi=.*")
+ !isEmpty(MFLOAT): GYP_ARGS += "-D arm_float_abi=\"$$MFLOAT\""
+
+ MARMV = $$replace(MARCH, "armv",)
+ !isEmpty(MARMV) {
+ MARMV = $$split(MARMV,)
+ MARMV = $$member(MARMV, 0)
+ GYP_ARGS += "-D arm_version=\"$$MARMV\""
+ }
+
+ contains(QMAKE_CFLAGS, "-mthumb"): GYP_ARGS += "-D arm_thumb=1"
+ }
+
+ # Needed for v8, see chromium/v8/build/toolchain.gypi
+ GYP_ARGS += "-D CXX=\"$$which($$QMAKE_CXX)\""
+}
+
+!build_pass {
+ message(Running gyp_qtwebengine $${GYP_ARGS}...)
+ !system("python ./gyp_qtwebengine $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --")
+}
+
+ninja.target = invoke_ninja
+ninja.commands = $$findOrBuildNinja() $$(NINJAFLAGS) -C $$getOutDir()/$$getConfigDir()
+ninja.depends: qmake
+QMAKE_EXTRA_TARGETS += ninja
+
+build_pass:build_all:default_target.target = all
+else: default_target.target = first
+default_target.depends = ninja
+
+QMAKE_EXTRA_TARGETS += default_target