-
-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy pathCMakeLists.txt
39 lines (35 loc) · 1.26 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
if (NOT ENABLE_KAFKA)
message(STATUS "Not using kafka")
return()
endif()
set(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/cppkafka")
set(SRCS
"${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"
)
add_library(_cppkafka ${SRCS})
add_library(ch_contrib::cppkafka ALIAS _cppkafka)
target_link_libraries(_cppkafka
PRIVATE
ch_contrib::rdkafka
boost::headers_only
)
target_include_directories(_cppkafka PRIVATE "${LIBRARY_DIR}/include/cppkafka")
target_include_directories(_cppkafka SYSTEM BEFORE PUBLIC "${LIBRARY_DIR}/include")