From 8efbf5f5f26af7e1505a2f8a4b768d799f5c4ef7 Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Fri, 3 May 2024 16:23:11 -0700 Subject: [PATCH 1/2] Add swift-foundation-icu build to Foundations build --- CMakeLists.txt | 5 +++++ Sources/Foundation/CMakeLists.txt | 1 + 2 files changed, 6 insertions(+) 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..4789c46f79 100644 --- a/Sources/Foundation/CMakeLists.txt +++ b/Sources/Foundation/CMakeLists.txt @@ -169,6 +169,7 @@ target_link_libraries(Foundation $<$:pathcch> CoreFoundation uuid + SwiftFoundationICU PUBLIC swiftDispatch) if("${CMAKE_C_COMPILER_TARGET}" MATCHES ".*-musl[^-*]$") From 836eef5bc9b9d98a7f8dac4237dd071d7e72f0fa Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Mon, 6 May 2024 09:53:58 -0700 Subject: [PATCH 2/2] Fix typo in target name --- Sources/Foundation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Foundation/CMakeLists.txt b/Sources/Foundation/CMakeLists.txt index 4789c46f79..776ea68812 100644 --- a/Sources/Foundation/CMakeLists.txt +++ b/Sources/Foundation/CMakeLists.txt @@ -169,7 +169,7 @@ target_link_libraries(Foundation $<$:pathcch> CoreFoundation uuid - SwiftFoundationICU + FoundationICU PUBLIC swiftDispatch) if("${CMAKE_C_COMPILER_TARGET}" MATCHES ".*-musl[^-*]$")