From bd58e41fbea4a5b377f06c1636e85fdec19ea4e9 Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Sun, 14 Jun 2026 15:44:05 +0200 Subject: [PATCH] Properly propagate Threads dependency --- src/core/CMakeLists.txt | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6bc90790..ff431ca5 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -160,21 +160,20 @@ if (WITH_BOOST) endif() endif() -target_link_libraries(soci_core - PRIVATE - $ -) - if (NOT MSVC) - find_package(Threads REQUIRED) - - target_link_libraries(soci_core - PRIVATE - Threads::Threads - ${CMAKE_DL_LIBS} + soci_private_dependency( + NAME Threads + DEP_TARGETS Threads::Threads + TARGET SOCI::Core ) endif() +target_link_libraries(soci_core + PRIVATE + ${CMAKE_DL_LIBS} + $ +) + target_compile_definitions(soci_core PRIVATE SOCI_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}${SOCI_NAME_PREFIX}soci_"