diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-05-25 12:37:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-05-25 16:40:56 +0200 |
commit | d53f7fcc52ab8f10ff406d5ae3bd00deeab969d8 (patch) | |
tree | dacd03ab1a3160162fc64083c267420ddaa27aab | |
parent | f71472d37e93a54be78c91ae1770204a4de273ea (diff) | |
download | qtwebengine-d53f7fcc52ab8f10ff406d5ae3bd00deeab969d8.tar.gz |
Add support for top-level configs and developer builds
Guess a toolchain link for top-level builds.
Copy the resources to their final destinations, and search
for the helper process where it is build in this config.
Change-Id: Ie9e829c19d42dddb85df188e48ec269f85268ed4
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/core/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/core/web_engine_library_info.cpp | 2 |
3 files changed, 30 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 75f019f38..203cd1c6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,13 @@ get_filename_component(WEBENGINE_ROOT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" R get_qt_features(featureList webengine) get_qt_features(featureList qtwebengine) +if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) + set(CMAKE_TOOLCHAIN_FILE "${CMAKE_BINARY_DIR}/qtbase/lib/cmake/Qt6/qt.toolchain.cmake") + list(APPEND libsCmakeArgs + "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" + ) +endif() + list(TRANSFORM featureList PREPEND "-D") list(APPEND libsCmakeArgs "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e467957e8..5017a552b 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -681,5 +681,25 @@ else() DESTINATION ${WEBENGINE_ROOT_BUILD_DIR}/resources CONFIGURATIONS ${config} ) + if(NOT QT_WILL_INSTALL) + # TODO: Could we get rid of ALL? + add_custom_target( + install_resources_${config} + ALL + DEPENDS ${buildDir}/${config}/QtWebEngineCore.stamp + COMMAND ${CMAKE_COMMAND} -E make_directory + ${CMAKE_INSTALL_PREFIX}/resources + COMMAND ${CMAKE_COMMAND} -E copy + ${resourceFiles} ${icuFiles} + ${CMAKE_INSTALL_PREFIX}/resources) + add_custom_target( + install_locales_${config} + ALL + DEPENDS ${buildDir}/${config}/QtWebEngineCore.stamp + COMMAND ${CMAKE_COMMAND} -E make_directory + ${CMAKE_INSTALL_PREFIX}/translations/qtwebengine_locales + COMMAND ${CMAKE_COMMAND} -E copy + ${localeFiles} + ${CMAKE_INSTALL_PREFIX}/translations/qtwebengine_locales) + endif() endif() - diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp index 4c540ad73..249f50613 100644 --- a/src/core/web_engine_library_info.cpp +++ b/src/core/web_engine_library_info.cpp @@ -170,6 +170,8 @@ QString subProcessPath() #else candidatePaths << QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) % QLatin1Char('/') % processBinary; + candidatePaths << QLibraryInfo::path(QLibraryInfo::BinariesPath) + % QLatin1Char('/') % processBinary; #endif candidatePaths << QCoreApplication::applicationDirPath() % QLatin1Char('/') % processBinary; |