Author: rinrab
Date: Sun Feb 1 10:56:51 2026
New Revision: 1931642
Log:
cmake: Include minor and patch versions into shared objects names.
This replicates r1931484 in cmake.
Examples for SVN 1.14.5:
Filename before: libsvn_subr-1.so.0.0.0
Filename after: libsvn_subr-1.so.0.14.5
SONAME before and after: libsvn_subr-1.so.0
* CMakeLists.txt
(read_version): Export each version component from the function.
* build/generator/templates/targets.cmake.ezt
(libs): Add minor and patch versions to VERSION target property of
each library.
Modified:
subversion/trunk/CMakeLists.txt
subversion/trunk/build/generator/templates/targets.cmake.ezt
Modified: subversion/trunk/CMakeLists.txt
==============================================================================
--- subversion/trunk/CMakeLists.txt Sun Feb 1 08:30:16 2026
(r1931641)
+++ subversion/trunk/CMakeLists.txt Sun Feb 1 10:56:51 2026
(r1931642)
@@ -32,6 +32,9 @@ function(read_version path var major min
string(REGEX REPLACE ".*${minor} +([0-9]+).*" "\\1" VER_MINOR
${VERSION_STRINGS})
string(REGEX REPLACE ".*${patch} +([0-9]+).*" "\\1" VER_PATCH
${VERSION_STRINGS})
+ set(${major} "${VER_MAJOR}" PARENT_SCOPE)
+ set(${minor} "${VER_MINOR}" PARENT_SCOPE)
+ set(${patch} "${VER_PATCH}" PARENT_SCOPE)
set(${var} "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" PARENT_SCOPE)
endif()
endfunction()
Modified: subversion/trunk/build/generator/templates/targets.cmake.ezt
==============================================================================
--- subversion/trunk/build/generator/templates/targets.cmake.ezt Sun Feb
1 08:30:16 2026 (r1931641)
+++ subversion/trunk/build/generator/templates/targets.cmake.ezt Sun Feb
1 10:56:51 2026 (r1931642)
@@ -50,7 +50,7 @@ if ([targets.enable_condition])[is targe
)[end]
set_target_properties([targets.name] PROPERTIES OUTPUT_NAME
"[targets.output_name]")[if-any targets.is_apache_mod]
set_target_properties([targets.name] PROPERTIES PREFIX "" SUFFIX ".so")[else]
- set_target_properties([targets.name] PROPERTIES SOVERSION "${SVN_SOVERSION}"
VERSION "${SVN_SOVERSION}.0.0")[end]
+ set_target_properties([targets.name] PROPERTIES SOVERSION "${SVN_SOVERSION}"
VERSION "${SVN_SOVERSION}.${SVN_VER_MINOR}.${SVN_VER_PATCH}")[end]
target_include_directories([targets.name] PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/subversion/include"
)[if-any targets.group]