From 15eee83be7b05b2629c599322b0c0f2c24b615dc Mon Sep 17 00:00:00 2001 From: Ivan Lezhankin Date: Mon, 14 Jan 2019 16:06:14 +0300 Subject: [PATCH] Use internal cppkafka in unbundled configuration --- cmake/find_rdkafka.cmake | 1 + contrib/CMakeLists.txt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/find_rdkafka.cmake b/cmake/find_rdkafka.cmake index b0a0a98b382..1c93b99a344 100644 --- a/cmake/find_rdkafka.cmake +++ b/cmake/find_rdkafka.cmake @@ -20,6 +20,7 @@ if (NOT USE_INTERNAL_RDKAFKA_LIBRARY) if (USE_STATIC_LIBRARIES AND NOT OS_FREEBSD) find_library (SASL2_LIBRARY sasl2) endif () + set (CPPKAFKA_LIBRARY cppkafka) # TODO: try to use unbundled version. endif () if (RDKAFKA_LIB AND RDKAFKA_INCLUDE_DIR) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 25ad30e02eb..8504e5facdb 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -121,11 +121,14 @@ endif () if (USE_INTERNAL_RDKAFKA_LIBRARY) add_subdirectory (librdkafka-cmake) - add_subdirectory (cppkafka-cmake) target_include_directories(rdkafka BEFORE PRIVATE ${ZLIB_INCLUDE_DIR}) target_include_directories(rdkafka BEFORE PRIVATE ${OPENSSL_INCLUDE_DIR}) endif () +if (USE_RDKAFKA) + add_subdirectory (cppkafka-cmake) +endif() + if (ENABLE_ODBC AND USE_INTERNAL_ODBC_LIBRARY) add_subdirectory (unixodbc-cmake) endif ()