diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-08-17 08:49:47 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-08-30 19:47:48 +0200 |
commit | 6bb20409cc25897df93663d2679edf8791960e94 (patch) | |
tree | c251b04975b702e394b929efce2f147ea32a0fa9 /src | |
parent | a6e9290ab0da6687ee8becefc706826300d7b2a2 (diff) |
Use rsp files directly from gn
Do not use gn created cmake files since this requires
cmake configuration step, which currently ends up
in duplicated targets in main and qtwebengine external
project. Use response files instead, so we can remove
duplicated targets in follow up patches. This approach
unfortunately has downside of cmake not being aware of
gn build artifacts and hacks directly linker command.
For universal builds remove not needed rsp template,
since we can now use rsp files directly generated by gn.
Task-number: QTBUG-95590
Change-Id: I83282ba68fa171cada7236d0587be27122315dec
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 96e47e1c9b6ce5c71e2560bb95f6e59ce062c8ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/CMakeLists.txt | 15 | ||||
-rw-r--r-- | src/core/configure/BUILD.root.gn.in | 4 | ||||
-rw-r--r-- | src/core/configure/rsp.cmake.in | 5 | ||||
-rw-r--r-- | src/pdf/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/pdf/configure/BUILD.root.gn.in | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 46121687c..e4283e1d9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -270,8 +270,9 @@ foreach(arch ${archs}) read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/core/api/${config}/gn_config.cxx.cmake) read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/core/api/${config}/gn_config.c.cmake) configure_gn_target(${buildGn} ${config} - ${WEBENGINE_ROOT_SOURCE_DIR}/src/core/configure/BUILD.root.gn.in ${buildDir}/${config}/${arch}/BUILD.gn) - + ${WEBENGINE_ROOT_SOURCE_DIR}/src/core/configure/BUILD.root.gn.in "${buildDir}/${config}/${arch}/BUILD.gn" + core/${config}/${arch} + ) ## # GN PARAMETERS SETUP @@ -468,7 +469,7 @@ target_include_directories(WebEngineCore PRIVATE ${buildDir}/$<CONFIG>/${arch}/gen/third_party/perfetto/build_config ) -add_gn_build_aritfacts_to_target(WebEngineCore QtWebEngineCore ON ${buildDir}) +add_gn_build_aritfacts_to_target(WebEngineCore QtWebEngineCore ${buildDir}) ## # SANDBOX @@ -478,8 +479,10 @@ if(WIN32) add_library(WebEngineCoreSandbox STATIC IMPORTED GLOBAL) foreach(config ${configs}) string(TOUPPER ${config} cfg) - add_ninja_command("" WebEngineCoreSandbox QtWebEngineCoreSandbox - QtWebEngineCoreSandbox.lib ${buildDir}/${config}/${arch} + add_ninja_command( + TARGET QtWebEngineCoreSandbox + OUTPUT QtWebEngineCoreSandbox.lib + BUILDDIR ${buildDir}/${config}/${arch} ) set(sandboxLibraryPath ${buildDir}/${config}/${arch}/QtWebEngineCoreSandbox.lib) set_property(TARGET WebEngineCoreSandbox @@ -591,6 +594,6 @@ if(QT_FEATURE_webengine_spellchecker) ../3rdparty/chromium/third_party/boringssl/src/include ${buildDir}/${config}/${arch}/gen ) - add_gn_build_aritfacts_to_target(${dict_target_name} convert_dict OFF ${buildDir}) + add_gn_build_aritfacts_to_target(${dict_target_name} convert_dict ${buildDir}) endif() diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in index 2e00c50b5..b64b367b9 100644 --- a/src/core/configure/BUILD.root.gn.in +++ b/src/core/configure/BUILD.root.gn.in @@ -89,7 +89,7 @@ config("cpp17_config") { } shared_library("QtWebEngineCore") { - cmake_config = "@GN_CONFIG@" + rsp_types = [ "objects", "archives", "libs" ] configs += [ ":cpp17_config", ":QtWebEngineCore_config", @@ -612,7 +612,7 @@ if (enable_extensions) { if (enable_spellcheck) { shared_library("convert_dict") { - cmake_config = "@GN_CONFIG@" + rsp_types = [ "objects", "archives", "libs" ] configs += [ "//build/config/compiler:wexit_time_destructors" ] deps = [ "//chrome/tools/convert_dict:lib", diff --git a/src/core/configure/rsp.cmake.in b/src/core/configure/rsp.cmake.in deleted file mode 100644 index d24299007..000000000 --- a/src/core/configure/rsp.cmake.in +++ /dev/null @@ -1,5 +0,0 @@ -include(@CMAKE_FILE@) -list(JOIN @CONFIG@_NINJA_OBJECTS " " objects) -list(JOIN @CONFIG@_NINJA_ARCHIVES " " archives) -file(WRITE ${CMAKE_CURRENT_LIST_DIR}/@TARGET@_gnobjects.rsp ${objects}) -file(WRITE ${CMAKE_CURRENT_LIST_DIR}/@TARGET@_gnarchives.rsp ${archives}) diff --git a/src/pdf/CMakeLists.txt b/src/pdf/CMakeLists.txt index b639b1243..12f01a73f 100644 --- a/src/pdf/CMakeLists.txt +++ b/src/pdf/CMakeLists.txt @@ -86,7 +86,9 @@ if(WEBENGINE_REPO_BUILD) read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/pdf/${config}/gn_config.cxx.cmake) read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/pdf/${config}/gn_config.c.cmake) configure_gn_target(${buildGn} ${config} - ${WEBENGINE_ROOT_SOURCE_DIR}/src/pdf/configure/BUILD.root.gn.in ${buildDir}/${config}/${arch}/BUILD.gn) + ${WEBENGINE_ROOT_SOURCE_DIR}/src/pdf/configure/BUILD.root.gn.in "${buildDir}/${config}/${arch}/BUILD.gn" + pdf/${config}/${arch} + ) ## # GN PARAMETERS @@ -157,5 +159,5 @@ if(WEBENGINE_REPO_BUILD) endforeach() set(arch ${CMAKE_SYSTEM_PROCESSOR}) target_include_directories(Pdf PRIVATE ${buildDir}/$<CONFIG>/${arch}/gen) - add_gn_build_aritfacts_to_target(Pdf QtPdf ON ${buildDir}) + add_gn_build_aritfacts_to_target(Pdf QtPdf ${buildDir}) endif() diff --git a/src/pdf/configure/BUILD.root.gn.in b/src/pdf/configure/BUILD.root.gn.in index a0cd41747..5252b701a 100644 --- a/src/pdf/configure/BUILD.root.gn.in +++ b/src/pdf/configure/BUILD.root.gn.in @@ -25,7 +25,7 @@ config("cpp17_config") { } shared_library("QtPdf") { - cmake_config = "@GN_CONFIG@" + rsp_types = [ "objects", "archives", "libs" ] configs += [ ":cpp17_config", ":QtPdf_config" |