orocos / orocos-bayesian-filtering

The orocos Bayesian Filtering Library
149 stars 59 forks source link

Please consider setting the SOVERSION when building orocos-bfl #44

Closed josch closed 6 years ago

josch commented 6 years ago

Hi,

when building the shared library of orocos-bfl, would you consider setting and maintaining the SOVERSION of the library? The following patch achieves this:

--- orocos-bfl-0.8.0.orig/src/CMakeLists.txt
+++ orocos-bfl-0.8.0/src/CMakeLists.txt
@@ -18,6 +18,7 @@ ENDIF( OROCOS_PLUGIN )
 IF (LIBRARY_TYPE STREQUAL "shared")
   ADD_LIBRARY(orocos-bfl SHARED $ENV{GLOBAL_LIBRARY_SRCS})
   SET_TARGET_PROPERTIES(orocos-bfl PROPERTIES OUTPUT_NAME orocos-bfl)
+  SET_TARGET_PROPERTIES(orocos-bfl PROPERTIES VERSION "1.0.0" SOVERSION 1)
   INSTALL_TARGETS( /lib orocos-bfl)       
 ELSE (LIBRARY_TYPE STREQUAL "shared")

By maintaining the version properly every time you do a release which does or doesn't break ABI backwords compatibility, it is possible for applications to know which version of the library they can use depending on against which version they were linked against.

toeklk commented 6 years ago

AFAICT, the so version is set already on master. Could you please recheck or explain in more detail what is wrong with the current Cmake code?

josch commented 6 years ago

Indeed I messed up and you already implemented this. Closing. Thanks!

josch commented 6 years ago

But do you thus plan to just bump the SOVERSION with every release you make? Even for releases that are backwards compatible?

toeklk commented 6 years ago

Will do, although since the move to github no releases have been done so far and unless somebody actively requests a new release I'm not sure I'm going to bother anymore...

josch commented 6 years ago

Since we have the package in Debian now, I would very much appreciate a release. :)

It would allow us to carry less patches.