Skip to content

Commit a2a46f0

Browse files
committed
remove rt lib if mac os
1 parent c3b4580 commit a2a46f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/FindRdKafka.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ try_compile(RdKafka_FOUND ${CMAKE_CURRENT_BINARY_DIR}
5555

5656
if (RdKafka_FOUND)
5757
add_library(RdKafka::rdkafka ${RDKAFKA_LIBRARY_TYPE} IMPORTED GLOBAL)
58-
set(RDKAFKA_DEPENDENCIES pthread rt ssl crypto dl z)
58+
if (UNIX AND NOT APPLE)
59+
set(RDKAFKA_DEPENDENCIES pthread rt ssl crypto dl z)
60+
else()
61+
set(RDKAFKA_DEPENDENCIES pthread ssl crypto dl z)
62+
endif()
5963
set_target_properties(RdKafka::rdkafka PROPERTIES
6064
IMPORTED_NAME RdKafka
6165
IMPORTED_LOCATION "${RdKafka_LIBRARY_PATH}"

0 commit comments

Comments
 (0)