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 /src/core/core_module.pro | |
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 'src/core/core_module.pro')
-rw-r--r-- | src/core/core_module.pro | 113 |
1 files changed, 65 insertions, 48 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 596993457..fc1c32786 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -4,9 +4,11 @@ include(core_common.pri) # Needed to set a CFBundleIdentifier QMAKE_INFO_PLIST = Info_mac.plist -# Look for linking information produced by gyp for our target according to core_generated.gyp -!include($$OUT_PWD/$$getConfigDir()/$${TARGET}_linking.pri) { - error("Could not find the linking information that gyp should have generated.") +use?(gn): linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri +else: linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}_linking.pri + +!include($$linking_pri) { + error("Could not find the linking information that gyp/gn should have generated.") } load(qt_module) @@ -17,6 +19,18 @@ api_library_path = $$OUT_PWD/api/$$getConfigDir() # Do not precompile any headers. We are only interested in the linker step. PRECOMPILED_HEADER = +use?(gn){ + isEmpty(NINJA_OBJECTS): error("Missing object files from QtWebEngineCore linking pri.") + isEmpty(NINJA_LFLAGS): error("Missing linker flags from QtWebEngineCore linking pri") + isEmpty(NINJA_ARCHIVES): error("Missing archive files from QtWebEngineCore linking pri") + isEmpty(NINJA_LIBS): error("Missing library files from QtWebEngineCore linking pri") + OBJECTS = $$NINJA_OBJECTS + linux: LIBS_PRIVATE = -Wl,-whole-archive $$NINJA_ARCHIVES -Wl,-no-whole-archive + LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS + QMAKE_LFLAGS += $$NINJA_LFLAGS + POST_TARGETDEPS += $$NINJA_TARGETDEPS +} + LIBS_PRIVATE += -L$$api_library_path CONFIG *= no_smart_library_merge osx { @@ -44,55 +58,58 @@ qtConfig(egl): CONFIG += egl linux:qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" -REPACK_DIR = $$OUT_PWD/$$getConfigDir()/gen/repack -# Duplicated from resources/resources.gyp -LOCALE_LIST = am ar bg bn ca cs da de el en-GB en-US es-419 es et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk vi zh-CN zh-TW -for(LOC, LOCALE_LIST) { - locales.files += $$REPACK_DIR/qtwebengine_locales/$${LOC}.pak -} -resources.files = $$REPACK_DIR/qtwebengine_resources.pak \ - $$REPACK_DIR/qtwebengine_resources_100p.pak \ - $$REPACK_DIR/qtwebengine_resources_200p.pak \ - $$REPACK_DIR/qtwebengine_devtools_resources.pak - -icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat - -!debug_and_release|!build_all|CONFIG(release, debug|release) { - qtConfig(framework) { - locales.version = Versions - locales.path = Resources/qtwebengine_locales - resources.version = Versions - resources.path = Resources - icu.version = Versions - icu.path = Resources - # No files, this prepares the bundle Helpers symlink, process.pro will create the directories - qtwebengineprocessplaceholder.version = Versions - qtwebengineprocessplaceholder.path = Helpers - QMAKE_BUNDLE_DATA += icu locales resources qtwebengineprocessplaceholder - } else { - locales.CONFIG += no_check_exist - locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales - resources.CONFIG += no_check_exist - resources.path = $$[QT_INSTALL_DATA]/resources - INSTALLS += locales resources - - !use?(system_icu) { - icu.CONFIG += no_check_exist - icu.path = $$[QT_INSTALL_DATA]/resources - INSTALLS += icu - } +!use?(gn) { + + REPACK_DIR = $$OUT_PWD/$$getConfigDir()/gen/repack + # Duplicated from resources/resources.gyp + LOCALE_LIST = am ar bg bn ca cs da de el en-GB en-US es-419 es et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk vi zh-CN zh-TW + for(LOC, LOCALE_LIST) { + locales.files += $$REPACK_DIR/qtwebengine_locales/$${LOC}.pak } + resources.files = $$REPACK_DIR/qtwebengine_resources.pak \ + $$REPACK_DIR/qtwebengine_resources_100p.pak \ + $$REPACK_DIR/qtwebengine_resources_200p.pak \ + $$REPACK_DIR/qtwebengine_devtools_resources.pak + + icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat + + !debug_and_release|!build_all|CONFIG(release, debug|release) { + qtConfig(framework) { + locales.version = Versions + locales.path = Resources/qtwebengine_locales + resources.version = Versions + resources.path = Resources + icu.version = Versions + icu.path = Resources + # No files, this prepares the bundle Helpers symlink, process.pro will create the directories + qtwebengineprocessplaceholder.version = Versions + qtwebengineprocessplaceholder.path = Helpers + QMAKE_BUNDLE_DATA += icu locales resources qtwebengineprocessplaceholder + } else { + locales.CONFIG += no_check_exist + locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales + resources.CONFIG += no_check_exist + resources.path = $$[QT_INSTALL_DATA]/resources + INSTALLS += locales resources + + !use?(system_icu) { + icu.CONFIG += no_check_exist + icu.path = $$[QT_INSTALL_DATA]/resources + INSTALLS += icu + } + } - !qtConfig(framework):!force_independent { - # - # Copy essential files to the qtbase build directory for non-prefix builds - # + !qtConfig(framework):!force_independent { + # + # Copy essential files to the qtbase build directory for non-prefix builds + # - !use?(system_icu) { - COPIES += icu - } + !use?(system_icu) { + COPIES += icu + } - COPIES += resources locales + COPIES += resources locales + } } } |