Skip to content

Commit 195db1e

Browse files
authored
Merge pull request #119 from oven-sh/fix-macos-build-for-icu-changes
Add `ICU_ROOT` environment variable support to fix macOS build with Homebrew ICU
2 parents c3e10aa + be8e684 commit 195db1e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/build-reusable.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
- name: Run
105105
env:
106106
ICU_INCLUDE_DIRS: ${{matrix.brew_prefix}}/icu4c/include
107+
ICU_ROOT: ${{matrix.brew_prefix}}/icu4c
107108
LDFLAGS: "${{env.LDFLAGS}} "
108109
CC: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/clang"
109110
CXX: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/clang++"

Source/cmake/OptionsJSCOnly.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ if (DEFINED ENV{ICU_INCLUDE_DIRS})
209209
set(ICU_INCLUDE_DIRS "$ENV{ICU_INCLUDE_DIRS}" CACHE "" INTERNAL FORCE)
210210
endif ()
211211

212+
if (DEFINED ENV{ICU_ROOT})
213+
set(ICU_ROOT "$ENV{ICU_ROOT}" CACHE PATH "" FORCE)
214+
endif ()
215+
212216
find_package(ICU 70.1 REQUIRED COMPONENTS data i18n uc)
213217

214218
if (APPLE)

0 commit comments

Comments
 (0)