mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 19:14:30 +00:00
24 lines
929 B
CMake
24 lines
929 B
CMake
option (USE_INTERNAL_CCTZ_LIBRARY "Set to FALSE to use system cctz library instead of bundled" ${NOT_UNBUNDLED})
|
|
|
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cctz/include/cctz/time_zone.h")
|
|
if(USE_INTERNAL_CCTZ_LIBRARY)
|
|
message(WARNING "submodule contrib/cctz is missing. to fix try run: \n git submodule update --init --recursive")
|
|
endif()
|
|
set(USE_INTERNAL_CCTZ_LIBRARY 0)
|
|
set(MISSING_INTERNAL_CCTZ_LIBRARY 1)
|
|
endif()
|
|
|
|
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
|
|
find_library (CCTZ_LIBRARY cctz)
|
|
find_path (CCTZ_INCLUDE_DIR NAMES cctz/civil_time.h civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
|
|
endif ()
|
|
|
|
if (CCTZ_LIBRARY AND CCTZ_INCLUDE_DIR)
|
|
elseif (NOT MISSING_INTERNAL_CCTZ_LIBRARY)
|
|
set (USE_INTERNAL_CCTZ_LIBRARY 1)
|
|
set (CCTZ_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/cctz/include")
|
|
set (CCTZ_LIBRARY cctz)
|
|
endif ()
|
|
|
|
message (STATUS "Using cctz: ${CCTZ_INCLUDE_DIR} : ${CCTZ_LIBRARY}")
|