Skip to content

Commit

Permalink
Update CMakeLists.txt to include pkg-config for Windows DLLs for stat…
Browse files Browse the repository at this point in the history
…ic MinGW builds
  • Loading branch information
neptoess committed Nov 2, 2020
1 parent 2fa3a83 commit 3d714b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 3 additions & 9 deletions src-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,9 @@ if(RDKAFKA_BUILD_STATIC)
set(PKG_CONFIG_DESCRIPTION
"The Apache Kafka C/C++ library (static)"
)
if(WIN32)
set(PKG_CONFIG_LIBS
"-lws2_32 -lsecur32 -lcrypt32 -L\${libdir} \${libdir}/librdkafka++.a"
)
else()
set(PKG_CONFIG_LIBS
"-L\${libdir} \${libdir}/librdkafka++.a"
)
endif()
set(PKG_CONFIG_LIBS
"-L\${libdir} \${libdir}/librdkafka++.a"
)
configure_file(
"../packaging/cmake/rdkafka.pc.in"
"${GENERATED_DIR}/rdkafka++-static.pc"
Expand Down
12 changes: 9 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,15 @@ if(RDKAFKA_BUILD_STATIC)
set(PKG_CONFIG_DESCRIPTION
"The Apache Kafka C/C++ library (static)"
)
set(PKG_CONFIG_LIBS
"-L\${libdir} \${libdir}/librdkafka.a"
)
if(WIN32)
set(PKG_CONFIG_LIBS
"-L\${libdir} \${libdir}/librdkafka.a -lws2_32 -lsecur32 -lcrypt32"
)
else()
set(PKG_CONFIG_LIBS
"-L\${libdir} \${libdir}/librdkafka.a"
)
endif()
configure_file(
"../packaging/cmake/rdkafka.pc.in"
"${GENERATED_DIR}/rdkafka-static.pc"
Expand Down

0 comments on commit 3d714b7

Please sign in to comment.