From fa65201fb21a9242bd822a84c60c65e681613b39 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 27 Sep 2024 17:53:27 -0300 Subject: [PATCH] Copy icudtl.dat file to bin/ directory (fix #4674) --- cmake/FindSkia.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/FindSkia.cmake b/cmake/FindSkia.cmake index 7dc6487a6..fd2e98462 100644 --- a/cmake/FindSkia.cmake +++ b/cmake/FindSkia.cmake @@ -251,3 +251,15 @@ add_library(skshaper INTERFACE) target_link_libraries(skshaper INTERFACE ${SKSHAPER_LIBRARY} skunicode) target_compile_definitions(skshaper INTERFACE SK_SHAPER_HARFBUZZ_AVAILABLE) + +# icudtl.dat file is needed by skunicode +set(SKIA_ICUDATA_FILE ${SKIA_DIR}/third_party/externals/icu/flutter/icudtl.dat) +set(SKIA_ICUDATA_FILE_OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/icudtl.dat) +add_custom_command( + OUTPUT ${SKIA_ICUDATA_FILE_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SKIA_ICUDATA_FILE} ${SKIA_ICUDATA_FILE_OUTPUT} + MAIN_DEPENDENCY ${SKIA_ICUDATA_FILE} + DEPENDS ${GEN_DEP}) +add_custom_target(skia_copy_icudata + DEPENDS ${SKIA_ICUDATA_FILE_OUTPUT}) +add_dependencies(skunicode skia_copy_icudata)