2020-07-16 20:32:32 +00:00
|
|
|
OPTION(ENABLE_KRB5 "Enable krb5" ${ENABLE_LIBRARIES})
|
2020-07-21 08:21:38 +00:00
|
|
|
|
2020-07-16 20:32:32 +00:00
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/krb5/README")
|
2021-10-17 23:29:04 +00:00
|
|
|
message (WARNING "submodule contrib/krb5 is missing. to fix try run: \n git submodule update --init")
|
2020-07-16 20:32:32 +00:00
|
|
|
set (ENABLE_KRB5 0)
|
|
|
|
endif ()
|
|
|
|
|
2021-03-11 20:41:10 +00:00
|
|
|
if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_CROSSCOMPILING))
|
|
|
|
message (WARNING "krb5 disabled in non-Linux and non-native-Darwin environments")
|
2020-07-21 08:21:38 +00:00
|
|
|
set (ENABLE_KRB5 0)
|
|
|
|
endif ()
|
|
|
|
|
2020-07-16 20:32:32 +00:00
|
|
|
if (ENABLE_KRB5)
|
|
|
|
|
|
|
|
set (USE_KRB5 1)
|
|
|
|
set (KRB5_LIBRARY krb5)
|
|
|
|
|
2020-07-28 22:34:31 +00:00
|
|
|
set (KRB5_INCLUDE_DIR
|
2020-07-16 20:32:32 +00:00
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/krb5/src/include"
|
2020-07-28 22:34:31 +00:00
|
|
|
"${ClickHouse_BINARY_DIR}/contrib/krb5-cmake/include"
|
|
|
|
)
|
2020-07-16 20:32:32 +00:00
|
|
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
message (STATUS "Using krb5=${USE_KRB5}: ${KRB5_INCLUDE_DIR} : ${KRB5_LIBRARY}")
|