CodeCommitsIssuesPull requestsActionsInsightsSecurity
CLICKHOUSE-3381

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/find_icu4c.cmake

22lines · modecode

1option (ENABLE_ICU "Enable ICU" ON)
2
3if (ENABLE_ICU)
4 set (ICU_PATHS "/usr/local/opt/icu4c/lib")
5 set (ICU_INCLUDE_PATHS "/usr/local/opt/icu4c/include")
6 find_library (ICUI18N icui18n PATHS ${ICU_PATHS})
7 find_library (ICUUC icuuc PATHS ${ICU_PATHS})
8 find_library (ICUDATA icudata PATHS ${ICU_PATHS})
9 set (ICU_LIBS ${ICUI18N} ${ICUUC} ${ICUDATA})
10
11 find_path (ICU_INCLUDE_DIR NAMES unicode/unistr.h PATHS ${ICU_INCLUDE_PATHS})
12 if (ICU_INCLUDE_DIR AND ICU_LIBS)
13 include_directories (${ICU_INCLUDE_DIR})
14 set(USE_ICU 1)
15 endif ()
16endif ()
17
18if (USE_ICU)
19 message (STATUS "Using icu=${USE_ICU}: ${ICU_INCLUDE_DIR} : ${ICU_LIBS}")
20else ()
21 message (STATUS "Build without ICU (support for collations and charset conversion functions will be disabled)")
22endif ()