diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dac9a46f1..81915bfcf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,11 @@ endif() find_package(ICU COMPONENTS uc i18n REQUIRED OPTIONAL_COMPONENTS data) +include(FetchContent) +FetchContent_Declare(SwiftFoundationICU + SOURCE_DIR "${CMAKE_SOURCE_DIR}/../swift-foundation-icu") +FetchContent_MakeAvailable(SwiftFoundationICU) + # This is needed if we're statically linking, otherwise we can't pull in Dispatch # because we won't have RT::rt as a CMake target. if(NOT CMAKE_SYSTEM_NAME STREQUAL Android) diff --git a/Sources/Foundation/CMakeLists.txt b/Sources/Foundation/CMakeLists.txt index d7a999f9b8..776ea68812 100644 --- a/Sources/Foundation/CMakeLists.txt +++ b/Sources/Foundation/CMakeLists.txt @@ -169,6 +169,7 @@ target_link_libraries(Foundation $<$:pathcch> CoreFoundation uuid + FoundationICU PUBLIC swiftDispatch) if("${CMAKE_C_COMPILER_TARGET}" MATCHES ".*-musl[^-*]$")