You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2020/08/06 22:56:33 UTC

[logging-log4cxx] branch master updated: Set SONAME in cmake like autotools based buildsystem would do.

This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git


The following commit(s) were added to refs/heads/master by this push:
     new bb71a25  Set SONAME in cmake like autotools based buildsystem would do.
     new 0b04b2a  Merge pull request #32 from coldtobi/fix_LOGCXX_512
bb71a25 is described below

commit bb71a251e6975298c4ee71e6c8de2bbcccdf2ef5
Author: Tobias Frost <to...@debian.org>
AuthorDate: Thu Aug 6 11:43:42 2020 +0200

    Set SONAME in cmake like autotools based buildsystem would do.
---
 CMakeLists.txt              | 5 +++++
 src/main/cpp/CMakeLists.txt | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2757cfe..d30a71b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,11 @@ include(src/cmake/projectVersionDetails.cmake)
 project(log4cxx VERSION ${log4cxx_VER} LANGUAGES CXX)
 include(CTest)
 
+# define the SO Version of the library. Version of the log4cxx project is subtly different than the version of the library
+# (at least in the past it was project vesion: 0.a.b.c and the library so vesion a.b.c.0
+set(LIBLOG4CXX_LIB_VERSION ${log4cxx_VERSION_MINOR}.${log4cxx_VERSION_PATCH}.${log4cxx_VERSION_TWEAK})
+set(LIBLOG4CXX_LIB_SOVERSION ${log4cxx_VERSION_MINOR})
+
 # FindAPR and FindAPR-util are not provided by APR and APR-Util so source them locally
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/cmake")
 
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index 8f7d609..213ece5 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -165,6 +165,6 @@ target_sources(log4cxx
   zipcompressaction.cpp
 )
 set_target_properties(log4cxx PROPERTIES
-  VERSION ${log4cxx_VERSION_MAJOR}.${log4cxx_VERSION_MINOR}.${log4cxx_VERSION_PATCH}
-  SOVERSION ${log4cxx_VERSION_MAJOR}
+  VERSION ${LIBLOG4CXX_LIB_VERSION}
+  SOVERSION ${LIBLOG4CXX_LIB_SOVERSION}
 )