Fix ICU detection in System.Globalization.Native build (#9990)
authorJan Vorlicek <janvorli@microsoft.com>
Tue, 7 Mar 2017 00:35:14 +0000 (01:35 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Mar 2017 00:35:14 +0000 (01:35 +0100)
The config.cmake was not getting the ICU library paths it requires to
build a code that detects presence of the ucol_setMaxVariable.
I have excluded the libraries detection from the CMakeLists.txt
some time ago since they are not used in the build itself anymore,
but I have not realized that they are needed for this detection
script that's included from the CMakeLists.txt.

src/corefx/System.Globalization.Native/CMakeLists.txt

index 1d63432..60ef5e8 100644 (file)
@@ -14,7 +14,7 @@ if(UTYPES_H STREQUAL UTYPES_H-NOTFOUND)
     return()
 endif()
 
-if (FEATURE_FIXED_ICU_VERSION AND NOT CLR_CMAKE_PLATFORM_DARWIN)
+if (NOT CLR_CMAKE_PLATFORM_DARWIN)
     find_library(ICUUC icuuc)
     if(ICUUC STREQUAL ICUUC-NOTFOUND)
         message(FATAL_ERROR "Cannot find libicuuc, try installing libicu-dev (or the appropriate package for your platform)")
@@ -26,9 +26,7 @@ if (FEATURE_FIXED_ICU_VERSION AND NOT CLR_CMAKE_PLATFORM_DARWIN)
         message(FATAL_ERROR "Cannot find libicui18n, try installing libicu-dev (or the appropriate package for your platform)")
         return()
     endif()
-endif()
-
-if(CLR_CMAKE_PLATFORM_DARWIN)
+else()
     find_library(ICUCORE icucore)
     if(ICUI18N STREQUAL ICUCORE-NOTFOUND)
         message(FATAL_ERROR "Cannot find libicucore, skipping build for System.Globalization.Native. .NET globalization is not expected to function.")