Skip to content

Commit 9de8128

Browse files
authored
Merge pull request #19147 from compnerd/cross-icu
build: only search for ICU if building the stdlib/sdk overlay
2 parents 23f41a5 + 5ba9133 commit 9de8128

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -866,11 +866,13 @@ endfunction()
866866
# package lookup. Otherwise, rely on the paths specified by the user. These
867867
# need to be defined when cross-compiling.
868868
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
869-
swift_icu_variables_set("${SWIFT_HOST_VARIANT_SDK_default}"
870-
"${SWIFT_HOST_VARIANT_ARCH_default}"
871-
ICU_CONFIGURED)
872-
if("${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "" AND NOT ${ICU_CONFIGURED})
873-
find_package(ICU REQUIRED COMPONENTS uc i18n)
869+
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
870+
swift_icu_variables_set("${SWIFT_HOST_VARIANT_SDK_default}"
871+
"${SWIFT_HOST_VARIANT_ARCH_default}"
872+
ICU_CONFIGURED)
873+
if("${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "" AND NOT ${ICU_CONFIGURED})
874+
find_package(ICU REQUIRED COMPONENTS uc i18n)
875+
endif()
874876
endif()
875877
endif()
876878

0 commit comments

Comments
 (0)