summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/core.pro24
-rw-r--r--src/core/core_generator.pro (renamed from src/core/core_gyp_generator.pro)13
-rw-r--r--src/core/core_gn_config.pri6
-rw-r--r--src/core/core_gyp_config.pri5
-rw-r--r--src/src.pro2
5 files changed, 33 insertions, 17 deletions
diff --git a/src/core/core.pro b/src/core/core.pro
index 86fe838cb..e495685eb 100644
--- a/src/core/core.pro
+++ b/src/core/core.pro
@@ -9,26 +9,32 @@ core_api.file = api/core_api.pro
core_module.file = core_module.pro
core_module.depends = core_api
-contains(WEBENGINE_CONFIG, use_gn) {
+# core_generator.pro is a dummy .pro file that is used by qmake
+# to generate our main .gyp/BUILD.gn file
+core_generator.file = core_generator.pro
+core_generator.depends = core_headers
+
+
+use?(gn) {
+
gn_run.file = gn_run.pro
- SUBDIRS += gn_run
-} else {
+ gn_run.depends = core_generator
- # core_gyp_generator.pro is a dummy .pro file that is used by qmake
- # to generate our main .gyp file
- core_gyp_generator.file = core_gyp_generator.pro
- core_gyp_generator.depends = core_headers
+ SUBDIRS += gn_run \
+ core_headers \
+ core_generator
+} else {
# gyp_run.pro calls gyp through gyp_qtwebengine on the qmake step, and ninja on the make step.
gyp_run.file = gyp_run.pro
- gyp_run.depends = core_gyp_generator
+ gyp_run.depends = core_generator
core_api.depends = gyp_run
SUBDIRS += gyp_run \
core_api \
core_module \
core_headers \
- core_gyp_generator
+ core_generator
!win32 {
# gyp_configure_host.pro and gyp_configure_target.pro are phony pro files that
diff --git a/src/core/core_gyp_generator.pro b/src/core/core_generator.pro
index a09683ba6..223ea076e 100644
--- a/src/core/core_gyp_generator.pro
+++ b/src/core/core_generator.pro
@@ -1,10 +1,9 @@
-# This is a dummy .pro file used to extract some aspects of the used configuration and feed them to gyp
-# We want the gyp generation step to happen after all the other config steps. For that we need to prepend
-# our gyp_generator.prf feature to the CONFIG variable since it is processed backwards
-CONFIG = gyp_generator $$CONFIG
-GYPFILE = $$OUT_PWD/core_generated.gyp
-GYPINCLUDES += $$PWD/qtwebengine.gypi
-GYPSRCDIR = $$PWD
+
+use?(gn) {
+ include(core_gn_config.pri)
+} else {
+ include(core_gyp_config.pri)
+}
TEMPLATE = lib
diff --git a/src/core/core_gn_config.pri b/src/core/core_gn_config.pri
new file mode 100644
index 000000000..ea45977f5
--- /dev/null
+++ b/src/core/core_gn_config.pri
@@ -0,0 +1,6 @@
+CONFIG = gn_generator $$CONFIG
+GN_SRC_DIR = $$PWD
+GN_FILE = $$OUT_PWD/BUILD.gn
+GN_FIND_MOCABLES_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_find_mocables.py)
+GN_RUN_BINARY_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_run_binary.py)
+
diff --git a/src/core/core_gyp_config.pri b/src/core/core_gyp_config.pri
new file mode 100644
index 000000000..999d019f9
--- /dev/null
+++ b/src/core/core_gyp_config.pri
@@ -0,0 +1,5 @@
+CONFIG = gyp_generator $$CONFIG
+GYPFILE = $$OUT_PWD/core_generated.gyp
+GYPINCLUDES += $$PWD/qtwebengine.gypi
+GYPSRCDIR = $$PWD
+
diff --git a/src/src.pro b/src/src.pro
index 3f793474f..26abd52cc 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -9,7 +9,7 @@ webengine_plugin.depends = webengine
SUBDIRS += core
-!contains(WEBENGINE_CONFIG, use_gn) {
+!use?(gn) {
SUBDIRS += process \
webengine \
webengine_plugin \