Skip to content

Commit

Permalink
out_kafka: make MSVC compatible (#1179)
Browse files Browse the repository at this point in the history
librdkafka is already compatible for MinGW and MSVC.
For MSVC, we should avoid to link libpthread.

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Apr 15, 2019
1 parent 99ef137 commit 69fffab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/windows-setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ set(FLB_OUT_STDOUT Yes)
set(FLB_OUT_LIB No)
set(FLB_OUT_NULL Yes)
set(FLB_OUT_FLOWCOUNTER Yes)
set(FLB_OUT_KAFKA No)
set(FLB_OUT_KAFKA Yes)
set(FLB_OUT_KAFKA_REST No)

# FILTER plugins
Expand Down
4 changes: 3 additions & 1 deletion plugins/out_kafka/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ set(src
kafka.c)

FLB_PLUGIN(out_kafka "${src}" "rdkafka")
target_link_libraries(flb-plugin-out_kafka -lpthread)
if (NOT MSVC)
target_link_libraries(flb-plugin-out_kafka -lpthread)
endif()

0 comments on commit 69fffab

Please sign in to comment.