From aca3d0545c4948a147a8efda7f2bd1e5efa4c131 Mon Sep 17 00:00:00 2001 From: Andrew Dutcher <andrew@andrewdutcher.com> Date: Wed, 14 Sep 2016 15:21:29 -0700 Subject: [PATCH 1/2] Set soname version correctly in cmake build --- contrib/cmake/src/CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/contrib/cmake/src/CMakeLists.txt b/contrib/cmake/src/CMakeLists.txt index f12c56f8e..6693b4f5b 100644 --- a/contrib/cmake/src/CMakeLists.txt +++ b/contrib/cmake/src/CMakeLists.txt @@ -117,14 +117,13 @@ else() set(lib_type "STATIC") endif() add_library(libz3 ${lib_type} ${object_files}) -# FIXME: Set "VERSION" and "SOVERSION" properly set_target_properties(libz3 PROPERTIES - # FIXME: Should we be using ${Z3_VERSION} here? - # VERSION: Sets up symlinks, does it do anything else? + # VERSION determines the version in the filename of the shared library. + # SOVERSION determines the value of the DT_SONAME field on ELF platforms. + # On ELF platforms the final compiled filename will be libz3.so.W.X.Y.Z + # but symlinks will be made to this file from libz3.so and also from libz3.so.W VERSION ${Z3_VERSION} - # SOVERSION: On platforms that use ELF this sets the API version - # and should be incremented everytime the API changes - SOVERSION ${Z3_VERSION}) + SOVERSION ${Z3_VERSION_MAJOR}) if (NOT MSVC) # On UNIX like platforms if we don't change the OUTPUT_NAME From 657b0de2fcb1c25009139e296532c6b8a5dc52d8 Mon Sep 17 00:00:00 2001 From: Andrew Dutcher <andrew@andrewdutcher.com> Date: Sun, 11 Dec 2016 08:27:35 -0800 Subject: [PATCH 2/2] cmake build: set SOVERSION to include the minor version number --- contrib/cmake/src/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/cmake/src/CMakeLists.txt b/contrib/cmake/src/CMakeLists.txt index 6693b4f5b..65eef8094 100644 --- a/contrib/cmake/src/CMakeLists.txt +++ b/contrib/cmake/src/CMakeLists.txt @@ -121,9 +121,12 @@ set_target_properties(libz3 PROPERTIES # VERSION determines the version in the filename of the shared library. # SOVERSION determines the value of the DT_SONAME field on ELF platforms. # On ELF platforms the final compiled filename will be libz3.so.W.X.Y.Z - # but symlinks will be made to this file from libz3.so and also from libz3.so.W + # but symlinks will be made to this file from libz3.so and also from + # libz3.so.W.X. + # This indicates that no breaking API changes will be made within a single + # minor version. VERSION ${Z3_VERSION} - SOVERSION ${Z3_VERSION_MAJOR}) + SOVERSION ${Z3_VERSION_MAJOR}.${Z3_VERSION_MINOR}) if (NOT MSVC) # On UNIX like platforms if we don't change the OUTPUT_NAME