ClickHouse/cmake/find_icu.cmake

16 lines
535 B
CMake
Raw Normal View History

2018-12-11 13:47:53 +00:00
option(ENABLE_ICU "Enable ICU" ON)
2018-11-27 15:34:21 +00:00
2018-12-11 13:47:53 +00:00
if(ENABLE_ICU)
find_package(ICU COMPONENTS i18n uc data) # TODO: remove Modules/FindICU.cmake after cmake 3.7
2018-11-27 15:34:21 +00:00
#set (ICU_LIBRARIES ${ICU_I18N_LIBRARY} ${ICU_UC_LIBRARY} ${ICU_DATA_LIBRARY} CACHE STRING "")
2018-12-11 13:47:53 +00:00
if(ICU_FOUND)
2018-11-27 15:34:21 +00:00
set(USE_ICU 1)
2018-12-11 13:47:53 +00:00
endif()
endif()
2018-11-27 15:34:21 +00:00
2018-12-11 13:47:53 +00:00
if(USE_ICU)
message(STATUS "Using icu=${USE_ICU}: ${ICU_INCLUDE_DIR} : ${ICU_LIBRARIES}")
else()
message(STATUS "Build without ICU (support for collations and charset conversion functions will be disabled)")
endif()