ClickHouse/cmake/find/krb5.cmake

27 lines
751 B
CMake
Raw Normal View History

2020-07-16 20:32:32 +00:00
OPTION(ENABLE_KRB5 "Enable krb5" ${ENABLE_LIBRARIES})
2020-07-16 20:32:32 +00:00
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/krb5/README")
message (WARNING "submodule contrib/krb5 is missing. to fix try run: \n git submodule update --init --recursive")
set (ENABLE_KRB5 0)
endif ()
if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
message (WARNING "krb5 disabled in non-Linux environments")
set (ENABLE_KRB5 0)
endif ()
2020-07-16 20:32:32 +00:00
if (ENABLE_KRB5)
set (USE_KRB5 1)
set (KRB5_LIBRARY krb5)
set (KRB5_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/krb5/include")
list (APPEND KRB5_INCLUDE_DIR
"${ClickHouse_SOURCE_DIR}/contrib/krb5/src/include"
)
endif ()
message (STATUS "Using krb5=${USE_KRB5}: ${KRB5_INCLUDE_DIR} : ${KRB5_LIBRARY}")