summaryrefslogtreecommitdiffstats
path: root/src/core/CMakeLists.txt
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2021-06-29 19:29:35 +0200
committerKirill Burtsev <kirill.burtsev@qt.io>2021-07-02 16:44:29 +0200
commitfa11a593ee0b263335dbb1d4212bf3c7604f0643 (patch)
tree4ac104070d80b4c4e46e92f88c455e0bfe550359 /src/core/CMakeLists.txt
parent7433e47ab1c9a2c0b2a0f1bc3a21d3c6ba36b071 (diff)
Fix build with system ICU library
Pick-to: 6.2 Change-Id: Ic4c3a0f2a187d25c92b76e06f9c5764cafc1e5a9 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/CMakeLists.txt')
-rw-r--r--src/core/CMakeLists.txt33
1 files changed, 10 insertions, 23 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 4619e3fa0..816f48a96 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -643,11 +643,14 @@ foreach(res ${resourceList})
list(APPEND resourceFiles ${resSourcePath})
endforeach()
-get_filename_component(icuFiles ${buildDir}/${config}/icudtl.dat REALPATH)
+if (NOT QT_FEATURE_webengine_system_icu)
+ get_filename_component(icuFile ${buildDir}/${config}/icudtl.dat REALPATH)
+ list(APPEND resourceFiles ${icuFile})
+endif()
if(QT_FEATURE_framework)
- set(allResourceFiles ${localeFiles} ${resourceFiles} ${icuFiles})
- target_sources(WebEngineCore PRIVATE ${icuFiles} ${resourceFiles} ${localeFiles})
+ set(allResourceFiles ${localeFiles} ${resourceFiles})
+ target_sources(WebEngineCore PRIVATE ${allResourceFiles})
set_source_files_properties(${localeFiles}
TARGET_DIRECTORY WebEngineCore
@@ -659,17 +662,9 @@ if(QT_FEATURE_framework)
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
GENERATED TRUE
)
- set_source_files_properties(${icuFiles}
- TARGET_DIRECTORY WebEngineCore
- PROPERTIES MACOSX_PACKAGE_LOCATION Resources
- GENERATED TRUE
- )
- add_custom_command(OUTPUT ${localeFiles} ${resourceFiles} ${icuFiles}
- DEPENDS ${buildDir}/${config}/QtWebEngineCore.stamp
- )
- add_custom_target(generate_resources_${config}
- DEPENDS ${localeFiles} ${resourcesFiles} ${icuFiles}
- )
+
+ add_custom_command(OUTPUT ${allResourceFiles} DEPENDS ${buildDir}/${config}/QtWebEngineCore.stamp)
+ add_custom_target(generate_resources_${config} DEPENDS ${allResourceFiles})
else()
install(FILES ${localeFiles}
DESTINATION translations/qtwebengine_locales
@@ -679,10 +674,6 @@ else()
DESTINATION resources
CONFIGURATIONS ${config}
)
- install(FILES ${icuFiles}
- DESTINATION resources
- CONFIGURATIONS ${config}
- )
# install (again) for superbuild
install(FILES ${localeFiles}
DESTINATION ${WEBENGINE_ROOT_BUILD_DIR}/translations/qtwebengine_locales
@@ -692,10 +683,6 @@ else()
DESTINATION ${WEBENGINE_ROOT_BUILD_DIR}/resources
CONFIGURATIONS ${config}
)
- install(FILES ${icuFiles}
- DESTINATION ${WEBENGINE_ROOT_BUILD_DIR}/resources
- CONFIGURATIONS ${config}
- )
if(NOT QT_WILL_INSTALL)
# TODO: Could we get rid of ALL?
add_custom_target(
@@ -705,7 +692,7 @@ else()
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_INSTALL_PREFIX}/resources
COMMAND ${CMAKE_COMMAND} -E copy
- ${resourceFiles} ${icuFiles}
+ ${resourceFiles}
${CMAKE_INSTALL_PREFIX}/resources)
add_custom_target(
install_locales_${config}