Skip to content

Commit e279550

Browse files
authored
Guard use of brew command by OSX (#50069)
1 parent 49a73e3 commit e279550

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ if(CLR_CMAKE_TARGET_UNIX)
1414
add_compile_options(-Wno-unknown-warning-option)
1515

1616
if (NOT CLR_CMAKE_TARGET_ANDROID)
17-
execute_process(COMMAND brew --prefix OUTPUT_VARIABLE brew_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
18-
set(ICU_HOMEBREW_INC_PATH "${brew_prefix}/opt/icu4c/include")
17+
if (CLR_CMAKE_TARGET_OSX)
18+
execute_process(COMMAND brew --prefix OUTPUT_VARIABLE brew_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
19+
set(ICU_HOMEBREW_INC_PATH "${brew_prefix}/opt/icu4c/include")
20+
endif()
1921

2022
find_path(UTYPES_H "unicode/utypes.h" PATHS ${ICU_HOMEBREW_INC_PATH})
2123
if(UTYPES_H STREQUAL UTYPES_H-NOTFOUND)

0 commit comments

Comments
 (0)