Skip to content

build: use the target variables for the ICU check #19418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -860,15 +860,14 @@ function(swift_icu_variables_set sdk arch result)
endif()
endfunction()

# ICU is provided through CoreFoundation on Darwin. On other hosts, assume that
# we are compiling for the build as the host. In such a case, if the ICU
# ICU is provided through CoreFoundation on Darwin. On other hosts, if the ICU
# unicode and i18n include and library paths are not defined, perform a standard
# package lookup. Otherwise, rely on the paths specified by the user. These
# need to be defined when cross-compiling.
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
swift_icu_variables_set("${SWIFT_HOST_VARIANT_SDK_default}"
"${SWIFT_HOST_VARIANT_ARCH_default}"
swift_icu_variables_set("${SWIFT_PRIMARY_VARIANT_SDK}"
"${SWIFT_PRIMARY_VARIANT_ARCH}"
ICU_CONFIGURED)
if("${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "" AND NOT ${ICU_CONFIGURED})
find_package(ICU REQUIRED COMPONENTS uc i18n)
Expand Down