Fix librdkafka/hdfs that depends on sasl2/krb5

This commit is contained in:
Azat Khuzhin 2022-01-19 09:16:10 +03:00
parent 97f9cf939e
commit 78858f9ba9
3 changed files with 10 additions and 9 deletions

View File

@ -85,10 +85,6 @@ add_contrib (thrift-cmake thrift)
add_contrib (arrow-cmake arrow) # requires: snappy, thrift, double-conversion
add_contrib (avro-cmake avro) # requires: snappy
add_contrib (protobuf-cmake protobuf)
add_contrib (libhdfs3-cmake libhdfs3) # requires: protobuf
add_contrib (hive-metastore-cmake hive-metastore) # requires: thrift/avro/arrow/libhdfs3
add_contrib (librdkafka-cmake librdkafka)
add_contrib (cppkafka-cmake cppkafka)
add_contrib (openldap-cmake openldap)
add_contrib (grpc-cmake grpc)
add_contrib (msgpack-c-cmake msgpack-c)
@ -108,7 +104,6 @@ if (ENABLE_TESTS)
endif()
add_contrib (llvm-cmake llvm)
add_contrib (libgsasl-cmake libgsasl)
add_contrib (libxml2-cmake libxml2)
add_contrib (aws-s3-cmake
aws
@ -129,6 +124,11 @@ add_contrib (sentry-native-cmake sentry-native) # requires: curl
add_contrib (fmtlib-cmake fmtlib)
add_contrib (krb5-cmake krb5)
add_contrib (cyrus-sasl-cmake cyrus-sasl) # for krb5
add_contrib (libgsasl-cmake libgsasl) # requires krb5
add_contrib (librdkafka-cmake librdkafka) # requires: libgsasl
add_contrib (libhdfs3-cmake libhdfs3) # requires: protobuf, krb5
add_contrib (hive-metastore-cmake hive-metastore) # requires: thrift/avro/arrow/libhdfs3
add_contrib (cppkafka-cmake cppkafka)
add_contrib (libpqxx-cmake libpqxx)
add_contrib (libpq-cmake libpq)
add_contrib (nuraft-cmake NuRaft)

View File

@ -9,7 +9,8 @@ if(NOT ENABLE_HDFS)
return()
endif()
if (${ENABLE_KRB5})
if (TARGET ch_contrib::krb5)
message(STATUS "Enable kerberos for HDFS")
SET(WITH_KERBEROS 1)
else()
SET(WITH_KERBEROS 0)

View File

@ -87,14 +87,14 @@ set(SRCS
"${RDKAFKA_SOURCE_DIR}/tinycthread_extra.c"
)
if(${ENABLE_CYRUS_SASL})
if(TARGET ch_contrib::sasl2)
message (STATUS "librdkafka with SASL support")
set(WITH_SASL_CYRUS 1)
endif()
message (STATUS "librdkafka with SSL support")
set(WITH_SSL 1)
if(${ENABLE_CYRUS_SASL})
if(WITH_SASL_CYRUS)
set(WITH_SASL_SCRAM 1)
set(WITH_SASL_OAUTHBEARER 1)
endif()
@ -127,7 +127,7 @@ target_link_libraries(_rdkafka
ch_contrib::zstd
OpenSSL::Crypto OpenSSL::SSL
)
if(${ENABLE_CYRUS_SASL})
if(WITH_SASL_CYRUS)
target_link_libraries(_rdkafka PRIVATE ch_contrib::sasl2)
endif()