From a599a8569be3f6d84a48c0af207dd5ea9f91dd7b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 28 Oct 2025 14:19:39 +0100 Subject: [PATCH] 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. --- src/core/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6ad0d034..309ac207 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -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")