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_"