From 863c7468b2ed9f266dc3c5d8795c6a591e9fd03c Mon Sep 17 00:00:00 2001 From: Michael Filonenko Date: Mon, 17 Oct 2022 19:56:52 +0300 Subject: [PATCH] Fix macos build --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69b5c3e..5404777 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,11 @@ if (ENABLE_ASAN) set(LIBRDKAFKA_FLAGS "--enable-devel") endif() +if (APPLE) + set(LIBRDKAFKA_CXX_FLAGS "${LIBRDKAFKA_CXX_FLAGS} ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT}") + set(LIBRDKAFKA_C_FLAGS "${LIBRDKAFKA_C_FLAGS} ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT}") +endif() + if(STATIC_BUILD) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/librdkafka/lib/librdkafka.a