mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Don't bother checking for Threads when using MSVC
We know that MSVC never needs any special options for using threads, so skip find_package(Threads) when using it.
This commit is contained in:
@@ -5,8 +5,6 @@ set(SOCI_LIB_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE STRING "Specifies suf
|
||||
set(SOCI_DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}" CACHE STRING "Specifies suffix for the library file in debug mode")
|
||||
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
add_library(soci_core
|
||||
${SOCI_LIB_TYPE}
|
||||
"backend-loader.cpp"
|
||||
@@ -156,13 +154,17 @@ if (WITH_BOOST)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(soci_core
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:soci_compiler_interface>
|
||||
PRIVATE
|
||||
Threads::Threads
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
if (NOT MSVC)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
target_link_libraries(soci_core
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:soci_compiler_interface>
|
||||
PRIVATE
|
||||
Threads::Threads
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if (DEFINED ABI_SUFFIX)
|
||||
set_target_properties(soci_core
|
||||
|
||||
Reference in New Issue
Block a user