The macOS 12 SDK bundled in Xcode 13 seems to contain a subset of icu headers now which means we're finding utypes.h in `Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/unicode` now.
When compiling System.Globalization.Native however we run into this error because ucurr.h isn't included in MacOSX12.0.sdk:
```
In file included from /Users/alexander/dev/runtime/src/libraries/Native/Unix/System.Globalization.Native/pal_casing.c:9:
/Users/alexander/dev/runtime/src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_internal.h:22:10: fatal error: 'unicode/ucurr.h' file not found
#include <unicode/ucurr.h>
^~~~~~~~~~~~~~~~~
1 error generated.
```
To workaround this check for ucurr.h in CMakeLists.txt instead so we continue to find ICU headers from Homebrew.
set(ICU_HOMEBREW_INC_PATH "${brew_prefix}/opt/icu4c/include")
endif()
- find_path(UTYPES_H "unicode/utypes.h" PATHS ${ICU_HOMEBREW_INC_PATH})
- if(UTYPES_H STREQUAL UTYPES_H-NOTFOUND)
- message(FATAL_ERROR "Cannot find utypes.h, try installing libicu-dev (or the appropriate package for your platform)")
+ find_path(UCURR_H "unicode/ucurr.h" PATHS ${ICU_HOMEBREW_INC_PATH})
+ if(UCURR_H STREQUAL UCURR_H-NOTFOUND)
+ message(FATAL_ERROR "Cannot find ucurr.h, try installing libicu-dev (or the appropriate package for your platform)")
return()
endif()
endif()
endif()
- include_directories(${UTYPES_H})
+ include_directories(${UCURR_H})
endif()
endif()
include(CheckSymbolExists)
if (CLR_CMAKE_TARGET_UNIX)
- set(CMAKE_REQUIRED_INCLUDES ${UTYPES_H} ${ICU_HOMEBREW_INC_PATH})
+ set(CMAKE_REQUIRED_INCLUDES ${UCURR_H} ${ICU_HOMEBREW_INC_PATH})
CHECK_C_SOURCE_COMPILES("
#include <unicode/udat.h>