2022-01-17 05:21:56 +00:00
|
|
|
if (NOT ENABLE_KAFKA)
|
2022-06-01 08:10:06 +00:00
|
|
|
message(STATUS "Not using kafka")
|
2022-01-17 05:21:56 +00:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2021-04-24 19:47:52 +00:00
|
|
|
set(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/cppkafka")
|
2018-12-27 13:27:01 +00:00
|
|
|
|
|
|
|
set(SRCS
|
2021-04-24 19:47:52 +00:00
|
|
|
"${LIBRARY_DIR}/src/buffer.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/configuration_option.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/configuration.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/consumer.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/error.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/event.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/exceptions.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/group_information.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/kafka_handle_base.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/message_internal.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/message_timestamp.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/message.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/metadata.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/producer.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/queue.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/topic_configuration.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/topic_partition_list.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/topic_partition.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/topic.cpp"
|
2018-12-27 13:27:01 +00:00
|
|
|
)
|
|
|
|
|
2022-01-17 05:21:56 +00:00
|
|
|
add_library(_cppkafka ${SRCS})
|
|
|
|
add_library(ch_contrib::cppkafka ALIAS _cppkafka)
|
2018-12-27 13:27:01 +00:00
|
|
|
|
2022-01-17 05:21:56 +00:00
|
|
|
target_link_libraries(_cppkafka
|
2020-06-09 10:54:49 +00:00
|
|
|
PRIVATE
|
2022-01-17 05:21:56 +00:00
|
|
|
ch_contrib::rdkafka
|
2020-06-09 10:54:49 +00:00
|
|
|
boost::headers_only
|
|
|
|
)
|
2022-01-17 05:21:56 +00:00
|
|
|
target_include_directories(_cppkafka PRIVATE "${LIBRARY_DIR}/include/cppkafka")
|
|
|
|
target_include_directories(_cppkafka SYSTEM BEFORE PUBLIC "${LIBRARY_DIR}/include")
|