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.
This commit is contained in:
Matteo Cypriani 2013-05-19 21:10:57 -04:00 committed by Matteo Cypriani
parent 464e3f223f
commit 9908ecf905
4 changed files with 15 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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
)