ClickHouse/libs/libcommon/cmake/find_cctz.cmake
proller 2d359fee54 Make libunwind optional. Allow use custom libcctz (#920)
* Make libunwind optional. Allow use custom libcctz

* fix

* Fix

* fix

* Update BaseDaemon.cpp

* Update CMakeLists.txt
2017-06-23 17:41:07 +03:00

18 lines
647 B
CMake

option (USE_INTERNAL_CCTZ_LIBRARY "Set to FALSE to use system cctz library instead of bundled" ${NOT_UNBUNDLED})
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
find_library (CCTZ_LIBRARY cctz)
find_path (CCTZ_INCLUDE_DIR NAMES civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
endif ()
if (CCTZ_LIBRARY AND CCTZ_INCLUDE_DIR)
#include_directories (${CCTZ_INCLUDE_DIR})
else ()
set (USE_INTERNAL_CCTZ_LIBRARY 1)
set (CCTZ_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libcctz/include")
#include_directories (BEFORE ${CCTZ_INCLUDE_DIR})
set (CCTZ_LIBRARY cctz)
endif ()
message (STATUS "Using cctz: ${CCTZ_INCLUDE_DIR} : ${CCTZ_LIBRARY}")