2017-06-23 14:41:07 +00:00
|
|
|
option (USE_INTERNAL_CCTZ_LIBRARY "Set to FALSE to use system cctz library instead of bundled" ${NOT_UNBUNDLED})
|
|
|
|
|
2017-11-02 18:55:52 +00:00
|
|
|
if (USE_INTERNAL_CCTZ_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cctz/include/cctz/time_zone.h")
|
|
|
|
message (WARNING "submodule contrib/cctz is missing. to fix try run: \n git submodule update --init --recursive")
|
2018-01-19 21:33:48 +00:00
|
|
|
set (MISSING_INTERNAL_CCTZ_LIBRARY 1)
|
2017-11-02 18:55:52 +00:00
|
|
|
set (USE_INTERNAL_CCTZ_LIBRARY 0)
|
|
|
|
endif ()
|
|
|
|
|
2017-06-23 14:41:07 +00:00
|
|
|
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
|
|
|
|
find_library (CCTZ_LIBRARY cctz)
|
2018-01-23 00:09:09 +00:00
|
|
|
find_path (CCTZ_INCLUDE_DIR NAMES cctz/civil_time.h civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
|
2017-06-23 14:41:07 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (CCTZ_LIBRARY AND CCTZ_INCLUDE_DIR)
|
2018-01-19 21:33:48 +00:00
|
|
|
elseif (NOT MISSING_INTERNAL_CCTZ_LIBRARY)
|
2017-06-23 14:41:07 +00:00
|
|
|
set (USE_INTERNAL_CCTZ_LIBRARY 1)
|
2018-01-19 21:33:48 +00:00
|
|
|
set (CCTZ_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/cctz/include")
|
2017-06-23 14:41:07 +00:00
|
|
|
set (CCTZ_LIBRARY cctz)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
message (STATUS "Using cctz: ${CCTZ_INCLUDE_DIR} : ${CCTZ_LIBRARY}")
|