Follow-up to #39833.
We don't link against ICU on macOS but load it via `dlopen()` at runtime and compilation uses headers from homebrew.
That means `HAVE_SET_MAX_VARIABLE` and `HAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS` will always be defined and we don't need the ICUCORE variable.
* PR feedback
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
endif()
if(CLR_CMAKE_TARGET_OSX)
- find_library(ICUCORE icucore)
- if(ICUCORE STREQUAL ICUCORE-NOTFOUND)
- message(FATAL_ERROR "Cannot find libicucore, skipping build for System.Globalization.Native. .NET globalization is not expected to function.")
- return()
- endif()
- add_definitions(-DOSX_ICU_LIBRARY_PATH=\"/usr/lib/libicucore.dylib\")
+ add_definitions(-DOSX_ICU_LIBRARY_PATH="/usr/lib/libicucore.dylib")
add_definitions(-DU_DISABLE_RENAMING)
else()
find_library(ICUUC icuuc)
-if(CLR_CMAKE_TARGET_ANDROID)
+if(CLR_CMAKE_TARGET_ANDROID OR CLR_CMAKE_TARGET_OSX)
set(HAVE_SET_MAX_VARIABLE 1)
set(HAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS 1)
else()
int main(void) { enum UDateFormatSymbolType e = UDAT_STANDALONE_SHORTER_WEEKDAYS; }
" HAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS)
- if(CLR_CMAKE_TARGET_OSX)
- set(CMAKE_REQUIRED_LIBRARIES ${ICUCORE})
- else()
- set(CMAKE_REQUIRED_LIBRARIES ${ICUUC} ${ICUI18N})
- endif()
+ set(CMAKE_REQUIRED_LIBRARIES ${ICUUC} ${ICUI18N})
check_symbol_exists(
ucol_setMaxVariable