Skip to content

Commit 9e6a816

Browse files
CDRIVER-4776 add thread library to pkg-config Libs (#1477)
* remove unused `gx_linkopts` * add thread library to pkg-config libs Co-authored-by: vector-of-bool <[email protected]>
1 parent 9fe8af1 commit 9e6a816

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
228228
find_package(Threads REQUIRED)
229229
mongo_platform_use_target(Threads::Threads)
230230

231+
set_property(DIRECTORY APPEND PROPERTY pkg_config_LIBS ${CMAKE_THREAD_LIBS_INIT})
232+
231233
if(WIN32)
232234
# Required for gethostbyname on Windows:
233235
mongo_platform_link_libraries(ws2_32)

build/cmake/GeneratePkgConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ function(_generate_pkg_config_content out)
286286
# XXX: Could we define a genex that can transform the INTERFACE_LINK_LIBRARIES to a list of
287287
# pkg-config-compatible "-l"-flags? That would remove the need to populate pkg_config_LIBS
288288
# manually, and instead rely on target properties to handle transitive dependencies.
289-
string(APPEND libs "$<JOIN:${gx_libs};${gx_linkopts}, >")
289+
string(APPEND libs "$<JOIN:${gx_libs}, >")
290290

291291
# Cflags:
292292
set(cflags)

0 commit comments

Comments
 (0)