mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
@@ -139,9 +139,6 @@ elseif(NOT SOCI_FMT_BUILTIN)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Name of the library to link with.
|
||||
set(soci_fmt fmt::fmt)
|
||||
|
||||
if(soci_use_bundled_fmt)
|
||||
if (NOT EXISTS ${PROJECT_SOURCE_DIR}/3rdparty/fmt/CMakeLists.txt)
|
||||
message(
|
||||
@@ -152,9 +149,6 @@ if(soci_use_bundled_fmt)
|
||||
endif()
|
||||
|
||||
add_subdirectory(3rdparty/fmt EXCLUDE_FROM_ALL)
|
||||
|
||||
# Use the header-only version to avoid forcing SOCI users to link with it.
|
||||
set(soci_fmt $<BUILD_INTERFACE:fmt::fmt-header-only>)
|
||||
endif()
|
||||
|
||||
# Helper function appending prefix and suffix to the library name.
|
||||
|
||||
@@ -149,7 +149,7 @@ function(soci_define_backend_target)
|
||||
endforeach()
|
||||
|
||||
# Set settings common to all backends.
|
||||
target_link_libraries(${DEFINE_BACKEND_TARGET_NAME} PUBLIC SOCI::Core PRIVATE ${soci_fmt})
|
||||
target_link_libraries(${DEFINE_BACKEND_TARGET_NAME} PUBLIC SOCI::Core PRIVATE $<BUILD_INTERFACE:fmt::fmt-header-only>)
|
||||
target_include_directories(${DEFINE_BACKEND_TARGET_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/include/private")
|
||||
|
||||
soci_build_library_name(full_backend_target_name "${DEFINE_BACKEND_TARGET_NAME}")
|
||||
|
||||
@@ -125,7 +125,7 @@ if (SOCI_SHARED)
|
||||
target_compile_definitions(soci_core PUBLIC SOCI_DLL)
|
||||
endif()
|
||||
|
||||
target_link_libraries(soci_core PRIVATE ${soci_fmt})
|
||||
target_link_libraries(soci_core PRIVATE $<BUILD_INTERFACE:fmt::fmt-header-only>)
|
||||
|
||||
if (WITH_BOOST)
|
||||
# Try and find Boost with the date_time component.
|
||||
|
||||
@@ -33,7 +33,7 @@ target_link_libraries(soci_tests_common
|
||||
PUBLIC
|
||||
soci_compiler_interface
|
||||
SOCI::Core
|
||||
${soci_fmt}
|
||||
$<BUILD_INTERFACE:fmt::fmt-header-only>
|
||||
)
|
||||
|
||||
target_include_directories(soci_tests_common
|
||||
|
||||
Reference in New Issue
Block a user