Skip to content

Commit

Permalink
CMake: Only use Libs, not Libs.private for rdkafka-static.pc and rdka…
Browse files Browse the repository at this point in the history
…fka++-static.pc
  • Loading branch information
neptoess authored and edenhill committed Apr 16, 2021
1 parent b493257 commit 8bacbc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ else()
set(PKG_CONFIG_CFLAGS "-I\${includedir} -DLIBRDKAFKA_STATICLIB")
set(PKG_CONFIG_LIBS "-L\${libdir} \${libdir}/librdkafka++.a")
if(WIN32)
set(PKG_CONFIG_LIBS_PRIVATE "-lws2_32 -lsecur32 -lcrypt32")
string(APPEND PKG_CONFIG_LIBS " -lws2_32 -lsecur32 -lcrypt32")
endif()

configure_file(
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ else()
set(PKG_CONFIG_DESCRIPTION "The Apache Kafka C/C++ library (static)")
set(PKG_CONFIG_CFLAGS "-I\${includedir} -DLIBRDKAFKA_STATICLIB")
set(PKG_CONFIG_LIBS "-L\${libdir} \${libdir}/librdkafka.a")
string(APPEND PKG_CONFIG_LIBS " ${PKG_CONFIG_LIBS_PRIVATE}")
set(PKG_CONFIG_LIBS_PRIVATE "")
configure_file(
"../packaging/cmake/rdkafka.pc.in"
"${GENERATED_DIR}/rdkafka-static.pc"
Expand Down

0 comments on commit 8bacbc0

Please sign in to comment.