From 158152cb46014f5601022bc45e6826837cb40c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sat, 19 Mar 2011 08:17:02 +0100 Subject: [PATCH] Use the same SO versioning as we had with automake/libtool http://article.gmane.org/gmane.comp.kde.devel.taglib/1826 --- CMakeLists.txt | 13 +++++++++++++ taglib/CMakeLists.txt | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5294fae6..723b2b7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,19 @@ SET(TAGLIB_LIB_PATCH_VERSION "0") SET(TAGLIB_LIB_VERSION_STRING "${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}") +# 1. If the library source code has changed at all since the last update, then increment revision. +# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0. +# 3. If any interfaces have been added since the last public release, then increment age. +# 4. If any interfaces have been removed since the last public release, then set age to 0. +SET(TAGLIB_SOVERSION_CURRENT 11) +SET(TAGLIB_SOVERSION_REVISION 0) +SET(TAGLIB_SOVERSION_AGE 10) + +MATH(EXPR TAGLIB_SOVERSION_MAJOR "${TAGLIB_SOVERSION_CURRENT} - ${TAGLIB_SOVERSION_AGE}") +MATH(EXPR TAGLIB_SOVERSION_MINOR "${TAGLIB_SOVERSION_AGE}") +MATH(EXPR TAGLIB_SOVERSION_PATCH "${TAGLIB_SOVERSION_REVISION}") + + include(ConfigureChecks.cmake) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib-config ) diff --git a/taglib/CMakeLists.txt b/taglib/CMakeLists.txt index f050a5c4..23f4796b 100644 --- a/taglib/CMakeLists.txt +++ b/taglib/CMakeLists.txt @@ -204,8 +204,8 @@ if(ZLIB_FOUND) endif(ZLIB_FOUND) SET_TARGET_PROPERTIES(tag PROPERTIES - VERSION ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION} - SOVERSION ${TAGLIB_LIB_MAJOR_VERSION} + VERSION ${TAGLIB_SOVERSION_MAJOR}.${TAGLIB_SOVERSION_MINOR}.${TAGLIB_SOVERSION_PATCH} + SOVERSION ${TAGLIB_SOVERSION_MAJOR} INSTALL_NAME_DIR ${LIB_INSTALL_DIR} DEFINE_SYMBOL MAKE_TAGLIB_LIB LINK_INTERFACE_LIBRARIES ""