ClickHouse/cmake/find/cassandra.cmake

27 lines
1.2 KiB
CMake
Raw Normal View History

2020-06-03 15:07:37 +00:00
option(ENABLE_CASSANDRA "Enable Cassandra" ${ENABLE_LIBRARIES})
if (ENABLE_CASSANDRA)
2020-05-19 17:48:28 +00:00
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libuv")
2020-06-03 15:07:37 +00:00
message (ERROR "submodule contrib/libuv is missing. to fix try run: \n git submodule update --init --recursive")
2020-05-19 17:48:28 +00:00
elseif (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
2020-06-03 15:07:37 +00:00
message (ERROR "submodule contrib/cassandra is missing. to fix try run: \n git submodule update --init --recursive")
2019-01-27 16:51:05 +00:00
else()
2020-05-22 14:19:33 +00:00
set (LIBUV_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/libuv")
2019-01-27 16:51:05 +00:00
set (CASSANDRA_INCLUDE_DIR
"${ClickHouse_SOURCE_DIR}/contrib/cassandra/include/")
2020-05-22 14:19:33 +00:00
if (USE_STATIC_LIBRARIES)
set (LIBUV_LIBRARY uv_a)
set (CASSANDRA_LIBRARY cassandra_static)
else()
set (LIBUV_LIBRARY uv)
set (CASSANDRA_LIBRARY cassandra)
endif()
2019-01-27 16:51:05 +00:00
set (USE_CASSANDRA 1)
2020-05-22 14:19:33 +00:00
set (CASS_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
2019-01-27 16:51:05 +00:00
endif()
endif()
2020-06-03 15:07:37 +00:00
message (STATUS "Using cassandra=${USE_CASSANDRA}: ${CASSANDRA_INCLUDE_DIR} : ${CASSANDRA_LIBRARY}")
message (STATUS "Using libuv: ${LIBUV_ROOT_DIR} : ${LIBUV_LIBRARY}")