ClickHouse/contrib/librdkafka-cmake/CMakeLists.txt

89 lines
3.7 KiB
CMake
Raw Normal View History

set(RDKAFKA_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/librdkafka/src)
set(SRCS
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/crc32c.c
2019-01-16 13:49:41 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_zstd.c
2020-05-28 14:52:03 +00:00
# ${RDKAFKA_SOURCE_DIR}/lz4.c
# ${RDKAFKA_SOURCE_DIR}/lz4frame.c
# ${RDKAFKA_SOURCE_DIR}/lz4hc.c
# ${RDKAFKA_SOURCE_DIR}/rdxxhash.c
# ${RDKAFKA_SOURCE_DIR}/regexp.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdaddr.c
${RDKAFKA_SOURCE_DIR}/rdavl.c
${RDKAFKA_SOURCE_DIR}/rdbuf.c
${RDKAFKA_SOURCE_DIR}/rdcrc32.c
2019-07-22 12:58:06 +00:00
${RDKAFKA_SOURCE_DIR}/rddl.c
2020-05-28 14:52:03 +00:00
${RDKAFKA_SOURCE_DIR}/rdfnv1a.c
2019-07-22 12:58:06 +00:00
${RDKAFKA_SOURCE_DIR}/rdhdrhistogram.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka.c
2020-05-28 14:52:03 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_admin.c # looks optional
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_assignor.c
2020-05-28 14:52:03 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_aux.c # looks optional
2018-12-28 09:07:58 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_background.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_broker.c
${RDKAFKA_SOURCE_DIR}/rdkafka_buf.c
2019-07-04 14:58:24 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_cert.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_cgrp.c
${RDKAFKA_SOURCE_DIR}/rdkafka_conf.c
2020-05-28 14:52:03 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_coord.c
${RDKAFKA_SOURCE_DIR}/rdkafka_error.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_event.c
${RDKAFKA_SOURCE_DIR}/rdkafka_feature.c
2018-12-28 09:07:58 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_idempotence.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_lz4.c
${RDKAFKA_SOURCE_DIR}/rdkafka_metadata.c
${RDKAFKA_SOURCE_DIR}/rdkafka_metadata_cache.c
${RDKAFKA_SOURCE_DIR}/rdkafka_mock.c
2020-05-28 14:52:03 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_mock_cgrp.c
${RDKAFKA_SOURCE_DIR}/rdkafka_mock_handlers.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_msg.c
${RDKAFKA_SOURCE_DIR}/rdkafka_msgset_reader.c
${RDKAFKA_SOURCE_DIR}/rdkafka_msgset_writer.c
${RDKAFKA_SOURCE_DIR}/rdkafka_offset.c
${RDKAFKA_SOURCE_DIR}/rdkafka_op.c
${RDKAFKA_SOURCE_DIR}/rdkafka_partition.c
${RDKAFKA_SOURCE_DIR}/rdkafka_pattern.c
2019-07-22 12:58:06 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_plugin.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_queue.c
${RDKAFKA_SOURCE_DIR}/rdkafka_range_assignor.c
${RDKAFKA_SOURCE_DIR}/rdkafka_request.c
${RDKAFKA_SOURCE_DIR}/rdkafka_roundrobin_assignor.c
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl.c
2020-05-28 14:52:03 +00:00
# ${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_cyrus.c # needed to support Kerberos, requires cyrus-sasl
2019-07-22 12:58:06 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_oauthbearer.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_plain.c
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_scram.c
2020-05-28 14:52:03 +00:00
# ${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_win32.c
2019-07-04 14:58:24 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_ssl.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_subscription.c
${RDKAFKA_SOURCE_DIR}/rdkafka_timer.c
${RDKAFKA_SOURCE_DIR}/rdkafka_topic.c
${RDKAFKA_SOURCE_DIR}/rdkafka_transport.c
${RDKAFKA_SOURCE_DIR}/rdkafka_interceptor.c
${RDKAFKA_SOURCE_DIR}/rdkafka_header.c
2020-05-28 14:52:03 +00:00
${RDKAFKA_SOURCE_DIR}/rdkafka_txnmgr.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdlist.c
${RDKAFKA_SOURCE_DIR}/rdlog.c
${RDKAFKA_SOURCE_DIR}/rdmurmur2.c
${RDKAFKA_SOURCE_DIR}/rdports.c
${RDKAFKA_SOURCE_DIR}/rdrand.c
${RDKAFKA_SOURCE_DIR}/rdregex.c
${RDKAFKA_SOURCE_DIR}/rdstring.c
${RDKAFKA_SOURCE_DIR}/rdunittest.c
${RDKAFKA_SOURCE_DIR}/rdvarint.c
${RDKAFKA_SOURCE_DIR}/snappy.c
${RDKAFKA_SOURCE_DIR}/tinycthread.c
2018-12-28 09:07:58 +00:00
${RDKAFKA_SOURCE_DIR}/tinycthread_extra.c
2018-12-27 13:27:01 +00:00
${RDKAFKA_SOURCE_DIR}/rdgz.c
)
add_library(rdkafka ${SRCS})
target_compile_options(rdkafka PRIVATE -fno-sanitize=undefined)
2018-12-27 13:27:01 +00:00
target_include_directories(rdkafka SYSTEM PUBLIC include)
2019-01-25 12:45:35 +00:00
target_include_directories(rdkafka SYSTEM PUBLIC ${RDKAFKA_SOURCE_DIR}) # Because weird logic with "include_next" is used.
target_include_directories(rdkafka SYSTEM PRIVATE ${ZSTD_INCLUDE_DIR}/common) # Because wrong path to "zstd_errors.h" is used.
target_link_libraries(rdkafka PRIVATE lz4 ${ZLIB_LIBRARIES} ${ZSTD_LIBRARY} ${LIBGSASL_LIBRARY})
if(OPENSSL_SSL_LIBRARY AND OPENSSL_CRYPTO_LIBRARY)
target_link_libraries(rdkafka PRIVATE ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
endif()