diff options
author | Michal Klocek <michal.klocek@qt.io> | 2016-11-23 20:08:09 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-01-25 09:15:33 +0000 |
commit | 2fab4a04938a4ddc30f9bdb1749e75e26a3df354 (patch) | |
tree | 20ffd5d85f3f851c88beb2652f68f9e9291190b5 /tools/qmake | |
parent | c2447a308882ba3691d66b2c28df197f571518c7 (diff) |
Add gn build of qtwebengine for linux
This commit uses gn instead of gyp to build on desktop
linux.
Use WEBENGINE_CONFIG+=use_gn to use gn during the build
instead of gyp.
Change-Id: Ifd3d8d0835b47c323a8d39c320eb55e5e1024dee
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tools/qmake')
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 16 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/gn_generator.prf | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index a47e4b7e8..9cd20d736 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -381,19 +381,23 @@ defineReplace(buildNinja) { !exists($$out) { mkpath($$dirname(out)) src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") - ninja_configure = $$absolute_path(ninja/configure.py, $$src_3rd_party_dir) - system("cd $$system_quote($$system_path($$dirname(out))) && python $$system_quote($$system_path($$ninja_configure)) --bootstrap") + ninja_configure = $$system_quote($$system_path($$absolute_path(ninja/configure.py, $$src_3rd_party_dir))) + !system("cd $$system_quote($$system_path($$dirname(out))) && python $$ninja_configure --bootstrap") { + error("NINJA build error!") + } } } defineReplace(gnPath) { src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") - out = $$shadowed($$absolute_path(chromium/tools/gn/gn, $$src_3rd_party_dir)) + out = $$shadowed($$absolute_path(chromium/tools/gn/out/Release/gn, $$src_3rd_party_dir)) + win32: out = $${out}.exe return($$out) } defineReplace(buildGn) { + gn_args = $$1 out = $$gnPath() !qtConfig(system-ninja): ninja_path = "--path $$ninjaPath()" # check if it is not already build @@ -401,9 +405,11 @@ defineReplace(buildGn) { mkpath($$dirname(out)) src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir)) - gn_args = $$system_quote(is_clang=false use_sysroot=false enable_remoting=false enable_nacl=false) + gn_args = $$system_quote($$gn_args) gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path - system("cd $$system_quote($$system_path($$dirname(out))) && python $$gn_configure") + !system("cd $$system_quote($$system_path($$dirname(out))) && python $$gn_configure") { + error("GN build error!") + } } } diff --git a/tools/qmake/mkspecs/features/gn_generator.prf b/tools/qmake/mkspecs/features/gn_generator.prf index c5f283a99..f53132feb 100644 --- a/tools/qmake/mkspecs/features/gn_generator.prf +++ b/tools/qmake/mkspecs/features/gn_generator.prf @@ -93,7 +93,7 @@ GN_CONTENTS += "}" TARGET_TYPE = $$getTargetType() GN_CONTENTS += "$${TARGET_TYPE}(\"$$TARGET\") {" - +!isEmpty(GN_CREATE_PRI): GN_CONTENTS += " create_pri_file = $$GN_CREATE_PRI" !isEmpty(GN_IMPORTS) { for (imp, GN_IMPORTS): GN_CONTENTS += " import(\"$$imp\")" } |