diff options
author | Alan Antonuk <aega@med.umich.edu> | 2012-10-02 10:26:40 -0400 |
---|---|---|
committer | Alan Antonuk <aega@med.umich.edu> | 2012-10-02 10:26:40 -0400 |
commit | 165c8de1dfc786c03279e101af3059a310282669 (patch) | |
tree | 3f9fee2ac0b9d3ed82406529c000df087747ac37 /CMakeLists.txt | |
parent | fca6fdd00159aee574665904c1f6c0cd852859a5 (diff) | |
download | rabbitmq-c-github-ask-165c8de1dfc786c03279e101af3059a310282669.tar.gz |
Correctly set-up SONAME for shared library versioning
We're starting with CURRENT=1 because CMake on OSX sets
CURRENT=0 which is a wildcard, which isn't what we want.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b60cfe..98f7f70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,25 @@ project(rabbitmq-c "C") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +# Follow all steps below in order to calculate new ABI version when updating the library +# NOTE: THIS IS UNRELATED to the actual project 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(RMQ_SOVERSION_CURRENT 1) +set(RMQ_SOVERSION_REVISION 0) +set(RMQ_SOVERSION_AGE 0) + +math(EXPR RMQ_SOVERSION_MAJOR "${RMQ_SOVERSION_CURRENT} - ${RMQ_SOVERSION_AGE}") +math(EXPR RMQ_SOVERSION_MINOR "${RMQ_SOVERSION_AGE}") +math(EXPR RMQ_SOVERSION_PATCH "${RMQ_SOVERSION_REVISION}") + +set(RMQ_VERSION ${RMQ_SOVERSION_MAJOR}.${RMQ_SOVERSION_MINOR}.${RMQ_SOVERSION_PATCH}) +set(RMQ_SOVERSION ${RMQ_SOVERSION_MAJOR}) + set(VERSION "0.2") if (MSVC) |