Skip to content

Commit 6188980

Browse files
committed
SR-8876: Update for CMake build for Foundation
- Copy ICU licence into final install.
1 parent cb32792 commit 6188980

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

utils/build-script-impl

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2550,6 +2550,20 @@ for host in "${ALL_HOSTS[@]}"; do
25502550
continue
25512551
fi
25522552

2553+
if [[ ! "${SKIP_BUILD_LIBICU}" ]] ; then
2554+
ICU_ROOT=$(build_directory ${host} libicu)/tmp_install
2555+
LIBICU_BUILD_ARGS=(
2556+
-DICU_ROOT:PATH=${ICU_ROOT}
2557+
-DICU_INCLUDE_DIR:PATH=${ICU_ROOT}/include
2558+
-DICU_UC_LIBRARIES:FILEPATH=${ICU_LIBDIR}/libicuucswift.so
2559+
-DICU_UC_LIBRARY:FILEPATH=${ICU_LIBDIR}/libicuucswift.so
2560+
-DICU_I18N_LIBRARIES:FILEPATH=${ICU_LIBDIR}/libicui18nswift.so
2561+
-DICU_I18N_LIBRARY:FILEPATH=${ICU_LIBDIR}/libicui18nswift.so
2562+
)
2563+
else
2564+
LIBICU_BUILD_ARGS=()
2565+
fi
2566+
25532567
# Staging: require opt-in for building with dispatch
25542568
if [[ ! "${SKIP_BUILD_LIBDISPATCH}" ]] ; then
25552569
LIBDISPATCH_BUILD_DIR="$(build_directory ${host} libdispatch)"
@@ -2574,6 +2588,7 @@ for host in "${ALL_HOSTS[@]}"; do
25742588
-DCMAKE_SWIFT_COMPILER:PATH=${SWIFTC_BIN}
25752589
-DCMAKE_INSTALL_PREFIX:PATH=$(get_host_install_prefix ${host})
25762590

2591+
${LIBICU_BUILD_ARGS[@]}
25772592
${LIBDISPATCH_BUILD_ARGS[@]}
25782593

25792594
# NOTE(compnerd) we disable tests because XCTest is not ready
@@ -3125,6 +3140,20 @@ for host in "${ALL_HOSTS[@]}"; do
31253140
continue
31263141
fi
31273142

3143+
if [[ ! "${SKIP_BUILD_LIBICU}" ]] ; then
3144+
ICU_ROOT=$(build_directory ${host} libicu)/tmp_install
3145+
LIBICU_BUILD_ARGS=(
3146+
-DICU_ROOT:PATH=${ICU_ROOT}
3147+
-DICU_INCLUDE_DIR:PATH=${ICU_ROOT}/include
3148+
-DICU_UC_LIBRARIES:FILEPATH=${ICU_LIBDIR}/libicuucswift.so
3149+
-DICU_UC_LIBRARY:FILEPATH=${ICU_LIBDIR}/libicuucswift.so
3150+
-DICU_I18N_LIBRARIES:FILEPATH=${ICU_LIBDIR}/libicui18nswift.so
3151+
-DICU_I18N_LIBRARY:FILEPATH=${ICU_LIBDIR}/libicui18nswift.so
3152+
)
3153+
else
3154+
LIBICU_BUILD_ARGS=()
3155+
fi
3156+
31283157
if [[ ! "${SKIP_BUILD_LIBDISPATCH}" ]] ; then
31293158
LIBDISPATCH_BUILD_DIR="$(build_directory ${host} libdispatch)"
31303159
LIBDISPATCH_BUILD_ARGS=(
@@ -3143,6 +3172,7 @@ for host in "${ALL_HOSTS[@]}"; do
31433172
-DCMAKE_SWIFT_COMPILER:PATH=${SWIFTC_BIN}
31443173
-DCMAKE_INSTALL_PREFIX:PATH=$(get_host_install_prefix ${host})
31453174

3175+
${LIBICU_BUILD_ARGS[@]}
31463176
${LIBDISPATCH_BUILD_ARGS[@]}
31473177

31483178
# NOTE(compnerd) the time has come to enable tests now
@@ -3453,7 +3483,8 @@ for host in "${ALL_HOSTS[@]}"; do
34533483
ICU_TMP_INSTALL_DIR="${ICU_BUILD_DIR}/tmp_install"
34543484
mkdir -p "${ICU_INSTALL_DIR}include"
34553485
cp -a "${ICU_TMP_INSTALL_DIR}/include/unicode" "${ICU_INSTALL_DIR}include"
3456-
3486+
mkdir -p "${ICU_INSTALL_DIR}share/icuswift"
3487+
cp -a "${ICU_TMP_INSTALL_DIR}/share/icuswift" "${ICU_INSTALL_DIR}share"
34573488
continue
34583489
;;
34593490
playgroundsupport)

0 commit comments

Comments
 (0)