From 9908ecf9059933dd05a54fbac38f085af5fe935f Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Sun, 19 May 2013 21:10:57 -0400 Subject: [PATCH] CMake: handle libraries' sonames libowlps-client and libowlps-resultreader were never built as shared libraries, therefore we set their version number to 1.0. For stable releases, the rule is to increase the minor version number when changes are made to the library without changing the API, and to bump the major version number (soname) in case of API change. In the development branch and for development point releases, the soname should not be increased, even in case of API break. The minor version number should be bumped instead. Following this rule, libowlps' version number is bumped to 3.1, as some changes were made since version 3.0. --- TODO.t2t | 1 - libowlps-client/CMakeLists.txt | 6 +++++- libowlps-resultreader/CMakeLists.txt | 6 +++++- libowlps/CMakeLists.txt | 6 +++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/TODO.t2t b/TODO.t2t index 92a4736..0037bac 100644 --- a/TODO.t2t +++ b/TODO.t2t @@ -56,7 +56,6 @@ Work to do in OwlPS - Add option dump-configuration (displays the config & exits). - CMake: - - libraries: version numbers (sonames) and symbolic links - installation targets - Support string-based positioning requests diff --git a/libowlps-client/CMakeLists.txt b/libowlps-client/CMakeLists.txt index 9d0db9e..12371e8 100644 --- a/libowlps-client/CMakeLists.txt +++ b/libowlps-client/CMakeLists.txt @@ -2,6 +2,10 @@ add_library(libowlps-client.a STATIC libowlps-client.c) add_library(libowlps-client.so SHARED libowlps-client.c) set_target_properties( libowlps-client.a libowlps-client.so - PROPERTIES OUTPUT_NAME owlps-client) + PROPERTIES + OUTPUT_NAME owlps-client + SOVERSION 1 + VERSION 1.0 + ) target_link_libraries(libowlps-client.so libowlps.so) target_link_libraries(libowlps-client.a libowlps.a) diff --git a/libowlps-resultreader/CMakeLists.txt b/libowlps-resultreader/CMakeLists.txt index 062e69a..157d6db 100644 --- a/libowlps-resultreader/CMakeLists.txt +++ b/libowlps-resultreader/CMakeLists.txt @@ -2,7 +2,11 @@ add_library(libowlps-resultreader.a STATIC libowlps-resultreader.c) add_library(libowlps-resultreader.so SHARED libowlps-resultreader.c) set_target_properties( libowlps-resultreader.a libowlps-resultreader.so - PROPERTIES OUTPUT_NAME owlps-resultreader) + PROPERTIES + OUTPUT_NAME owlps-resultreader + SOVERSION 1 + VERSION 1.0 + ) target_link_libraries(libowlps-resultreader.so libowlps.so) target_link_libraries(libowlps-resultreader.a libowlps.a) diff --git a/libowlps/CMakeLists.txt b/libowlps/CMakeLists.txt index 7fda6b1..7255025 100644 --- a/libowlps/CMakeLists.txt +++ b/libowlps/CMakeLists.txt @@ -2,4 +2,8 @@ add_library(libowlps.a STATIC libowlps.c) add_library(libowlps.so SHARED libowlps.c) set_target_properties( libowlps.a libowlps.so - PROPERTIES OUTPUT_NAME owlps) + PROPERTIES + OUTPUT_NAME owlps + SOVERSION 3 + VERSION 3.1 + )