From ea825050244238b65895f44c13076bc3fa025c5d Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 5 Apr 2022 12:03:17 +0200 Subject: Fix location of WebEngineProcess on build machines for framework builds For some unknown reason we had built qtwebengine process in 'libexecdir' and installed later into 'libdir' for module frameworks builds. Unfortunately this can not work if you run tests on same build machines as bundle for webenginecore will be loaded form build dir and not form installation dir resulting in load of webengineprocess form incorrect 'libdir'. Set simply correct build paths, so they match install ones: framework build uses 'libdir' and non framework one 'libdirexec'. Remove bogus copy line as it is no longer needed for super builds. Copy resources locally to build tree so local build tree test can use them during execution. Change-Id: Ib61ac5659330386ca43c9e403d5fe4d5e214158f Reviewed-by: Alexandru Croitor (cherry picked from commit ef685c981d4245b7c704a9d566b05db064756c1f) Reviewed-by: Qt Cherry-pick Bot --- src/core/api/CMakeLists.txt | 8 ++++++++ src/process/CMakeLists.txt | 15 +++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt index ffc450039..803cd43c9 100644 --- a/src/core/api/CMakeLists.txt +++ b/src/core/api/CMakeLists.txt @@ -141,6 +141,14 @@ if(QT_FEATURE_framework) add_custom_command(OUTPUT ${allResourceFiles} DEPENDS ${buildDir}/${config}/${arch}/QtWebEngineCore.stamp) add_custom_target(generate_resources_${config} DEPENDS ${allResourceFiles}) + + addCopyCommand(WebEngineCore "${localeFiles}" + "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Resources/qtwebengine_locales/" + ) + addCopyCommand(WebEngineCore "${resourceFiles}" + "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Resources/" + ) + else() install(FILES ${localeFiles} DESTINATION ${INSTALL_TRANSLATIONSDIR}/qtwebengine_locales diff --git a/src/process/CMakeLists.txt b/src/process/CMakeLists.txt index 8628500c0..7054cac79 100644 --- a/src/process/CMakeLists.txt +++ b/src/process/CMakeLists.txt @@ -41,10 +41,18 @@ qt_internal_extend_target(${qtWebEngineProcessName} target_include_directories(${qtWebEngineProcessName} PRIVATE ../core) qt_get_cmake_configurations(configs) + foreach(config ${configs}) string(TOUPPER "${config}" config_upper) + if(isFramework) + set(outputPath + "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers" + ) + else() + set(outputPath "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}") + endif() set_target_properties(${qtWebEngineProcessName} PROPERTIES - RUNTIME_OUTPUT_DIRECTORY_${config_upper} "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}" + RUNTIME_OUTPUT_DIRECTORY_${config_upper} "${outputPath}" ) endforeach() @@ -75,11 +83,6 @@ if(isFramework) BUNDLE DESTINATION "${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers" COMPONENT Runtime ) - if(QT_SUPERBUILD OR NOT QT_WILL_INSTALL) - addCopyDirCommand(${qtWebEngineProcessName} "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/${qtWebEngineProcessName}.app" - "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers/${qtWebEngineProcessName}.app/" - ) - endif() qt_enable_separate_debug_info(${qtWebEngineProcessName} "${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers" QT_EXECUTABLE ) -- cgit v1.2.3