diff --git a/CMakeLists.txt b/CMakeLists.txt index 51826131e6..bbc945365f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ if(HAS_LIBDISPATCH_API) find_package(dispatch CONFIG REQUIRED) endif() -find_package(ICU COMPONENTS uc i18n REQUIRED) +find_package(ICU COMPONENTS uc i18n REQUIRED OPTIONAL_COMPONENTS data) include(SwiftSupport) include(GNUInstallDirs) diff --git a/CoreFoundation/CMakeLists.txt b/CoreFoundation/CMakeLists.txt index 9871290d09..afd005e4cc 100644 --- a/CoreFoundation/CMakeLists.txt +++ b/CoreFoundation/CMakeLists.txt @@ -397,6 +397,10 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) target_link_libraries(CoreFoundation PRIVATE ICU::uc ICU::i18n) + if(ICU_DATA_FOUND) + target_link_libraries(CoreFoundation PRIVATE + ICU::data) + endif() endif() if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)