mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
32 lines
1.2 KiB
CMake
32 lines
1.2 KiB
CMake
option(ENABLE_LIBPQXX "Enalbe libpqxx" ${ENABLE_LIBRARIES})
|
|
|
|
if (NOT ENABLE_LIBPQXX)
|
|
return()
|
|
endif()
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libpqxx/src")
|
|
message (WARNING "submodule contrib/libpqxx is missing. to fix try run: \n git submodule update --init")
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libpqxx library")
|
|
set (USE_LIBPQXX 0)
|
|
return()
|
|
endif()
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libpq/include")
|
|
message (ERROR "submodule contrib/libpq is missing. to fix try run: \n git submodule update --init")
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libpq needed for libpqxx")
|
|
set (USE_LIBPQXX 0)
|
|
return()
|
|
endif()
|
|
|
|
if (NOT USE_INTERNAL_SSL_LIBRARY)
|
|
set (USE_LIBPQXX 0)
|
|
else ()
|
|
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}")
|
|
endif()
|