summaryrefslogtreecommitdiffstats
path: root/src/core/api/CMakeLists.txt
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-08-30 17:45:10 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-01 10:00:51 +0000
commit3fc526499f8279c3507c4e534fb8dd3a7e968482 (patch)
treec50a6065308a02b56a2138ce72d67d3759b8e791 /src/core/api/CMakeLists.txt
parent854bdc6a16fc3ff98c537e87b5fea8f90c67b96c (diff)
Adjust install and copy path for locales and resources
In case of top level build with prefix, make sure we also copy resources and locales to build dir, so tests can be executed without installing. Task-number: QTBUG-95590 Change-Id: Ie64e650259b2c38a6eda8d15a94f7101ad8380a8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f2153965c8f8459af4edcf30d69b4f1e81085cb4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/core/api/CMakeLists.txt')
-rw-r--r--src/core/api/CMakeLists.txt30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt
index 7f0380216..e711d362a 100644
--- a/src/core/api/CMakeLists.txt
+++ b/src/core/api/CMakeLists.txt
@@ -128,19 +128,27 @@ if(QT_FEATURE_framework)
add_custom_command(OUTPUT ${allResourceFiles} DEPENDS ${buildDir}/${config}/${arch}/QtWebEngineCore.stamp)
add_custom_target(generate_resources_${config} DEPENDS ${allResourceFiles})
else()
- install(FILES ${localeFiles}
- DESTINATION ${INSTALL_TRANSLATIONSDIR}/qtwebengine_locales
- CONFIGURATIONS ${config}
- )
- install(FILES ${resourceFiles}
- DESTINATION ${INSTALL_DATADIR}/resources
- CONFIGURATIONS ${config}
- )
if(NOT QT_WILL_INSTALL)
set(rootPath ${CMAKE_INSTALL_PREFIX})
else()
- set(rootPath ${PROJECT_BINARY_DIR})
+ if(NOT QT_SUPERBUILD)
+ set(rootPath ${PROJECT_BINARY_DIR})
+ else()
+ set(rootPath ${QT_BUILD_DIR})
+ endif()
+ install(FILES ${localeFiles}
+ DESTINATION ${INSTALL_TRANSLATIONSDIR}/qtwebengine_locales
+ CONFIGURATIONS ${config}
+ )
+ install(FILES ${resourceFiles}
+ DESTINATION ${INSTALL_DATADIR}/resources
+ CONFIGURATIONS ${config}
+ )
endif()
- addCopyCommand(WebEngineCore "${localeFiles}" ${rootPath}/translations/qtwebengine_locales)
- addCopyCommand(WebEngineCore "${resourceFiles}" ${rootPath}/resources)
+ addCopyCommand(WebEngineCore "${localeFiles}"
+ ${rootPath}/${INSTALL_TRANSLATIONSDIR}/qtwebengine_locales
+ )
+ addCopyCommand(WebEngineCore "${resourceFiles}"
+ ${rootPath}/${INSTALL_DATADIR}/resources
+ )
endif()