From fe8186fc9f190103044da55493ff4ed295defb22 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 23 Dec 2020 10:39:53 +0100 Subject: [PATCH] fix soname versioning as suggested in #98 --- CMakeVersions.txt | 22 +++++++++++++--------- src/libhashkit/CMakeLists.txt | 3 ++- src/libmemcached/CMakeLists.txt | 3 ++- src/libmemcachedprotocol/CMakeLists.txt | 3 ++- src/libmemcachedutil/CMakeLists.txt | 3 ++- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CMakeVersions.txt b/CMakeVersions.txt index aa77bdaa..81275015 100644 --- a/CMakeVersions.txt +++ b/CMakeVersions.txt @@ -22,11 +22,11 @@ endfunction() # set(LIBMEMCACHED_VERSION_MAJOR 1) -set(LIBMEMCACHED_VERSION_MINOR 0) -set(LIBMEMCACHED_VERSION_PATCH 99) +set(LIBMEMCACHED_VERSION_MINOR 1) +set(LIBMEMCACHED_VERSION_PATCH 0) set(LIBMEMCACHED_VERSION ${LIBMEMCACHED_VERSION_MAJOR}.${LIBMEMCACHED_VERSION_MINOR}.${LIBMEMCACHED_VERSION_PATCH}) -set(LIBMEMCACHED_VERSION_INC ${LIBMEMCACHED_VERSION_MAJOR}.${LIBMEMCACHED_VERSION_MINOR}) +set(LIBMEMCACHED_VERSION_INC ${LIBMEMCACHED_VERSION_MAJOR}.0) to_hex(LIBMEMCACHED_VERSION_HEX ${LIBMEMCACHED_VERSION_MAJOR} ${LIBMEMCACHED_VERSION_MINOR} ${LIBMEMCACHED_VERSION_PATCH}) # libmemcached.so @@ -35,6 +35,7 @@ set(LIBMEMCACHED_SO_VERSION_CUR 11) set(LIBMEMCACHED_SO_VERSION_REV 0) set(LIBMEMCACHED_SO_VERSION_AGE 0) +set(LIBMEMCACHED_SO_SOVERSION ${LIBMEMCACHED_SO_VERSION_CUR}.${LIBMEMCACHED_SO_VERSION_REV}) set(LIBMEMCACHED_SO_VERSION ${LIBMEMCACHED_SO_VERSION_CUR}.${LIBMEMCACHED_SO_VERSION_REV}.${LIBMEMCACHED_SO_VERSION_AGE}) # @@ -42,11 +43,11 @@ set(LIBMEMCACHED_SO_VERSION ${LIBMEMCACHED_SO_VERSION_CUR}.${LIBMEMCACHED_SO_VER # set(LIBMEMCACHEDUTIL_VERSION_MAJOR 1) -set(LIBMEMCACHEDUTIL_VERSION_MINOR 0) +set(LIBMEMCACHEDUTIL_VERSION_MINOR 1) set(LIBMEMCACHEDUTIL_VERSION_PATCH 0) set(LIBMEMCACHEDUTIL_VERSION ${LIBMEMCACHEDUTIL_VERSION_MAJOR}.${LIBMEMCACHEDUTIL_VERSION_MINOR}.${LIBMEMCACHEDUTIL_VERSION_PATCH}) -set(LIBMEMCACHEDUTIL_VERSION_INC ${LIBMEMCACHEDUTIL_VERSION_MAJOR}.${LIBMEMCACHEDUTIL_VERSION_MINOR}) +set(LIBMEMCACHEDUTIL_VERSION_INC ${LIBMEMCACHEDUTIL_VERSION_MAJOR}.0) to_hex(LIBMEMCACHEDUTIL_VERSION_HEX ${LIBMEMCACHEDUTIL_VERSION_MAJOR} ${LIBMEMCACHEDUTIL_VERSION_MINOR} ${LIBMEMCACHEDUTIL_VERSION_PATCH}) # libmemcachedutil.so @@ -55,6 +56,7 @@ set(LIBMEMCACHEDUTIL_SO_VERSION_CUR 2) set(LIBMEMCACHEDUTIL_SO_VERSION_REV 0) set(LIBMEMCACHEDUTIL_SO_VERSION_AGE 0) +set(LIBMEMCACHEDUTIL_SO_SOVERSION ${LIBMEMCACHEDUTIL_SO_VERSION_CUR}.${LIBMEMCACHEDUTIL_SO_VERSION_REV}) set(LIBMEMCACHEDUTIL_SO_VERSION ${LIBMEMCACHEDUTIL_SO_VERSION_CUR}.${LIBMEMCACHEDUTIL_SO_VERSION_REV}.${LIBMEMCACHEDUTIL_SO_VERSION_AGE}) # @@ -62,11 +64,11 @@ set(LIBMEMCACHEDUTIL_SO_VERSION ${LIBMEMCACHEDUTIL_SO_VERSION_CUR}.${LIBMEMCACHE # set(LIBMEMCACHEDPROTOCOL_VERSION_MAJOR 0) -set(LIBMEMCACHEDPROTOCOL_VERSION_MINOR 0) +set(LIBMEMCACHEDPROTOCOL_VERSION_MINOR 1) set(LIBMEMCACHEDPROTOCOL_VERSION_PATCH 0) set(LIBMEMCACHEDPROTOCOL_VERSION ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR}.${LIBMEMCACHEDPROTOCOL_VERSION_MINOR}.${LIBMEMCACHEDPROTOCOL_VERSION_PATCH}) -set(LIBMEMCACHEDPROTOCOL_VERSION_INC ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR}.${LIBMEMCACHEDPROTOCOL_VERSION_MINOR}) +set(LIBMEMCACHEDPROTOCOL_VERSION_INC ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR}.0) to_hex(LIBMEMCACHEDPROTOCOL_VERSION_HEX ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR} ${LIBMEMCACHEDPROTOCOL_VERSION_MINOR} ${LIBMEMCACHEDPROTOCOL_VERSION_PATCH}) # libmemcachedprotocol.so @@ -75,6 +77,7 @@ set(LIBMEMCACHEDPROTOCOL_SO_VERSION_CUR 0) set(LIBMEMCACHEDPROTOCOL_SO_VERSION_REV 0) set(LIBMEMCACHEDPROTOCOL_SO_VERSION_AGE 0) +set(LIBMEMCACHEDPROTOCOL_SO_SOVERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION_CUR}.${LIBMEMCACHEDPROTOCOL_SO_VERSION_REV}) set(LIBMEMCACHEDPROTOCOL_SO_VERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION_CUR}.${LIBMEMCACHEDPROTOCOL_SO_VERSION_REV}.${LIBMEMCACHEDPROTOCOL_SO_VERSION_AGE}) # @@ -82,11 +85,11 @@ set(LIBMEMCACHEDPROTOCOL_SO_VERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION_CUR}.${LIB # set(LIBHASHKIT_VERSION_MAJOR 1) -set(LIBHASHKIT_VERSION_MINOR 0) +set(LIBHASHKIT_VERSION_MINOR 1) set(LIBHASHKIT_VERSION_PATCH 0) set(LIBHASHKIT_VERSION ${LIBHASHKIT_VERSION_MAJOR}.${LIBHASHKIT_VERSION_MINOR}.${LIBHASHKIT_VERSION_PATCH}) -set(LIBHASHKIT_VERSION_INC ${LIBHASHKIT_VERSION_MAJOR}.${LIBHASHKIT_VERSION_MINOR}) +set(LIBHASHKIT_VERSION_INC ${LIBHASHKIT_VERSION_MAJOR}.0) to_hex(LIBHASHKIT_VERSION_HEX ${LIBHASHKIT_VERSION_MAJOR} ${LIBHASHKIT_VERSION_MINOR} ${LIBHASHKIT_VERSION_PATCH}) # libhashkit.so @@ -95,4 +98,5 @@ set(LIBHASHKIT_SO_VERSION_CUR 2) set(LIBHASHKIT_SO_VERSION_REV 0) set(LIBHASHKIT_SO_VERSION_AGE 0) +set(LIBHASHKIT_SO_SOVERSION ${LIBHASHKIT_SO_VERSION_CUR}.${LIBHASHKIT_SO_VERSION_REV}) set(LIBHASHKIT_SO_VERSION ${LIBHASHKIT_SO_VERSION_CUR}.${LIBHASHKIT_SO_VERSION_REV}.${LIBHASHKIT_SO_VERSION_AGE}) diff --git a/src/libhashkit/CMakeLists.txt b/src/libhashkit/CMakeLists.txt index ae57244f..81129ef7 100644 --- a/src/libhashkit/CMakeLists.txt +++ b/src/libhashkit/CMakeLists.txt @@ -27,7 +27,8 @@ set_target_properties(libhashkit PROPERTIES CXX_STANDARD ${CXX_STANDARD} LIBRARY_OUTPUT_NAME hashkit LIBRARY_OUTPUT_NAME_DEBUG hashkit-dbg - SOVERSION ${LIBHASHKIT_SO_VERSION}) + SOVERSION ${LIBHASHKIT_SO_SOVERSION} + VERSION ${LIBHASHKIT_SO_VERSION}) target_compile_options(libhashkit PRIVATE -DBUILDING_HASHKIT) target_include_directories(libhashkit PRIVATE ${CMAKE_SOURCE_DIR}/src diff --git a/src/libmemcached/CMakeLists.txt b/src/libmemcached/CMakeLists.txt index c688c7b9..ebc5a213 100644 --- a/src/libmemcached/CMakeLists.txt +++ b/src/libmemcached/CMakeLists.txt @@ -91,7 +91,8 @@ set_target_properties(libmemcached PROPERTIES CXX_STANDARD ${CXX_STANDARD} LIBRARY_OUTPUT_NAME memcached LIBRARY_OUTPUT_NAME_DEBUG memcached-dbg - SOVERSION ${LIBMEMCACHED_SO_VERSION}) + SOVERSION ${LIBMEMCACHED_SO_SOVERSION} + VERSION ${LIBMEMCACHED_SO_VERSION}) target_compile_definitions(libmemcached PRIVATE -DBUILDING_LIBMEMCACHED) target_link_libraries(libmemcached PUBLIC libhashkit Threads::Threads ${CMAKE_DL_LIBS}) target_link_libraries(libmemcached PRIVATE p9y) diff --git a/src/libmemcachedprotocol/CMakeLists.txt b/src/libmemcachedprotocol/CMakeLists.txt index 74658008..3e69aad9 100644 --- a/src/libmemcachedprotocol/CMakeLists.txt +++ b/src/libmemcachedprotocol/CMakeLists.txt @@ -14,7 +14,8 @@ set_target_properties(libmemcachedprotocol PROPERTIES CXX_STANDARD ${CXX_STANDARD} LIBRARY_OUTPUT_NAME memcachedprotocol LIBRARY_OUTPUT_NAME_DEBUG memcachedprotocol-dbg - SOVERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION}) + SOVERSION ${LIBMEMCACHEDPROTOCOL_SO_SOVERSION} + VERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION}) target_compile_definitions(libmemcachedprotocol PRIVATE -DBUILDING_LIBMEMCACHED) if(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) set_target_properties(libmemcachedprotocol PROPERTIES diff --git a/src/libmemcachedutil/CMakeLists.txt b/src/libmemcachedutil/CMakeLists.txt index e08de188..88f1e8df 100644 --- a/src/libmemcachedutil/CMakeLists.txt +++ b/src/libmemcachedutil/CMakeLists.txt @@ -15,7 +15,8 @@ set_target_properties(libmemcachedutil PROPERTIES CXX_STANDARD ${CXX_STANDARD} LIBRARY_OUTPUT_NAME memcachedutil LIBRARY_OUTPUT_NAME_DEBUG memcachedutil-dbg - SOVERSION ${LIBMEMCACHEDUTIL_SO_VERSION}) + SOVERSION ${LIBMEMCACHEDUTIL_SO_SOVERSION} + VERSION ${LIBMEMCACHEDUTIL_SO_VERSION}) target_compile_definitions(libmemcachedutil PRIVATE -DBUILDING_LIBMEMCACHED) if(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) set_target_properties(libmemcachedutil PROPERTIES -- 2.30.2