2020-12-10 00:36:31 +00:00
|
|
|
option(ENABLE_LIBPQXX "Enalbe libpqxx" ${ENABLE_LIBRARIES})
|
|
|
|
|
|
|
|
if (NOT ENABLE_LIBPQXX)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libpqxx/CMakeLists.txt")
|
|
|
|
message (WARNING "submodule contrib/libpqxx is missing. to fix try run: \n git submodule update --init --recursive")
|
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libpqxx library")
|
|
|
|
set (USE_LIBPQXX 0)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2020-12-14 21:33:02 +00:00
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libpq/include")
|
2020-12-10 00:36:31 +00:00
|
|
|
message (ERROR "submodule contrib/libpq is missing. to fix try run: \n git submodule update --init --recursive")
|
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libpq needed for libpqxx")
|
|
|
|
set (USE_LIBPQXX 0)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2020-12-30 16:00:05 +00:00
|
|
|
if (NOT USE_INTERNAL_SSL_LIBRARY)
|
|
|
|
set (USE_LIBPQXX 0)
|
|
|
|
else ()
|
2020-12-10 00:36:31 +00:00
|
|
|
set (USE_LIBPQXX 1)
|
|
|
|
set (LIBPQXX_LIBRARY libpqxx)
|
|
|
|
set (LIBPQ_LIBRARY libpq)
|
|
|
|
set (LIBPQXX_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libpqxx/include")
|
|
|
|
set (LIBPQ_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/libpq")
|
|
|
|
message (STATUS "Using libpqxx=${USE_LIBPQXX}: ${LIBPQXX_INCLUDE_DIR} : ${LIBPQXX_LIBRARY}")
|
|
|
|
message (STATUS "Using libpq: ${LIBPQ_ROOT_DIR} : ${LIBPQ_INCLUDE_DIR} : ${LIBPQ_LIBRARY}")
|
2020-12-30 16:00:05 +00:00
|
|
|
endif()
|