Skip to content

Commit 2a12e45

Browse files
committed
makes sure targets requireing libmamba-spdlog also gets threading facilities
1 parent 3228dd8 commit 2a12e45

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

libmamba-spdlog/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ else()
1717
endif()
1818

1919
find_package(spdlog CONFIG REQUIRED)
20+
find_package(Threads REQUIRED)
2021

2122
# For some reasons, using target_compile_definitions does not set the definitions properly
2223
add_compile_definitions(
@@ -33,15 +34,21 @@ add_library(mamba::libmamba-spdlog ALIAS libmamba-spdlog)
3334

3435
target_include_directories(libmamba-spdlog INTERFACE include/)
3536

36-
target_link_libraries(libmamba-spdlog
37-
INTERFACE
37+
target_link_libraries(libmamba-spdlog
38+
INTERFACE
3839
${libmamba_target}
3940
# Since conda-forge spdlog is built with a bundled version of fmt we use the header
4041
# only version to avoid chasing after the correct fmt version matching the one used
41-
# in the bundle
42+
# in the bundle.
4243
spdlog::spdlog_header_only
44+
45+
# We need the threading facilities available whatever the user use.
46+
# This should have been part of depending on spdlog but for some reason it's
47+
# not made available automatically.
48+
Threads::Threads
4349
)
4450

51+
4552
mamba_target_add_compile_warnings(libmamba-spdlog WARNING_AS_ERROR ${MAMBA_WARNING_AS_ERROR})
4653

4754
target_compile_features(libmamba-spdlog INTERFACE cxx_std_20)

0 commit comments

Comments
 (0)