From 439e0ed3f1fe9145f5224bbf5a2e5ed13f9a8909 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Thu, 29 Aug 2024 23:23:13 -0400 Subject: [PATCH] refactor: Update ICU library configuration and dependencies --- cmake/BuildICU.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmake/BuildICU.cmake b/cmake/BuildICU.cmake index c440557..567d8f2 100644 --- a/cmake/BuildICU.cmake +++ b/cmake/BuildICU.cmake @@ -81,19 +81,20 @@ else() set(ICU_HASH "SHA256=cb968df3e4d2e87e8b11c49a5d01c787bd13b9545280fc6642f826527618caef") if(APPLE) set(ICU_PLATFORM "MacOSX") - set(ICU_ADDITIONAL_CONFIGURE_COMMAND --with-library-bits=64 CFLAGS=-arch\ ${TARGET_ARCH} - CXXFLAGS=-arch\ ${TARGET_ARCH} LDFLAGS=-arch\ ${TARGET_ARCH}) + set(TARGET_ARCH -arch\ $ENV{MACOS_ARCH}) + set(ICU_ADDITIONAL_CONFIGURE_COMMAND_PREFIX CFLAGS=${TARGET_ARCH} CXXFLAGS=${TARGET_ARCH} LDFLAGS=${TARGET_ARCH}) else() set(ICU_PLATFORM "Linux") - set(ICU_ADDITIONAL_CONFIGURE_COMMAND "") + set(ICU_ADDITIONAL_CONFIGURE_COMMAND_PREFIX "A=A") endif() ExternalProject_Add( ICU_build GIT_REPOSITORY "https://github.com/unicode-org/icu.git" GIT_TAG "release-${ICU_VERSION_DASH}" - CONFIGURE_COMMAND /icu4c/source/runConfigureICU ${ICU_PLATFORM} --prefix= --enable-static - --disable-shared --disable-debug --enable-release ${ICU_ADDITIONAL_CONFIGURE_COMMAND} + CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E env ${ICU_ADDITIONAL_CONFIGURE_COMMAND_PREFIX} /icu4c/source/runConfigureICU + ${ICU_PLATFORM} --prefix= --enable-static --disable-shared BUILD_COMMAND make -j4 BUILD_BYPRODUCTS /lib/${CMAKE_STATIC_LIBRARY_PREFIX}icudata${CMAKE_STATIC_LIBRARY_SUFFIX}