Fix build with Xcode 13 / MacOSX12.0.sdk (#56829)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 4 Aug 2021 14:19:07 +0000 (16:19 +0200)
committerGitHub <noreply@github.com>
Wed, 4 Aug 2021 14:19:07 +0000 (16:19 +0200)
commit5255bbb7a5b690dc0dcefca5dd46dde11825a021
tree66d9c380d6270dc8e1fb3e28a045151b00e6642f
parent95147163dac477da5177f5c5402ae9b93feb5c89
Fix build with Xcode 13 / MacOSX12.0.sdk (#56829)

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.
src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
src/libraries/Native/Unix/System.Globalization.Native/configure.cmake