Define SOCI_ABI_VERSION when compiling SOCI core

Somehow this definition was lost, meaning that the dynamic backend
loader code didn't use ABI_VERSION any longer and tried to load
libsoci_backend.so instead of libsoci_backend.so.SOVERSION as intended
under Unix.
This commit is contained in:
Vadim Zeitlin
2025-10-28 14:19:39 +01:00
parent 088a991e5e
commit a599a8569b

View File

@@ -31,6 +31,10 @@ add_library(soci_core
# always define during compilation to control symbol visibility/export
target_compile_definitions(soci_core PRIVATE SOCI_SOURCE)
if(ABI_VERSION)
target_compile_definitions(soci_core PRIVATE SOCI_ABI_VERSION="${ABI_VERSION}")
endif()
add_library(SOCI::Core ALIAS soci_core)
soci_build_library_name(soci_core_name "soci_core")