[CMake] Shared library versioning (Take 3)

Filipe Sousa filipe at ipb.pt
Tue Jul 11 04:28:22 EDT 2006


Fathi Boudra wrote:
> hi,
> 
> i'll try to add a correct soname to a shared library.
> 
> I found some old informations:
> http://public.kitware.com/pipermail/cmake/2003-June/003923.html
> http://public.kitware.com/pipermail/cmake/2003-June/003985.html
> 
> and looked at ITK sources:
> #----------------------------------------------------------------------------
> - # ITK build configuration options.
> OPTION(BUILD_SHARED_LIBS "Build ITK with shared libraries." OFF)
> SET(ITK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
> 
> IF(NOT ITK_NO_LIBRARY_VERSION)
>   # This setting of SOVERSION assumes that any API change
>   # will increment either the minor or major version number of ITK.
>   SET(ITK_LIBRARY_PROPERTIES
>       VERSION   "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.
> ${ITK_VERSION_PATCH}"
>       SOVERSION "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}"
>      )
> ENDIF(NOT ITK_NO_LIBRARY_VERSION)
> 
> but i didn't find a proper documentation about it. is there a link somewhere
> or other interesting informations that i missed ?

fsousa at neptuno ~ $ cmake --help-command set_target_properties
Targets can have properties that affect how they are built.

         SET_TARGET_PROPERTIES(target1 target2 ...
                               PROPERTIES prop1 value1
                               prop2 value2 ...)
...
For shared libraries VERSION and SOVERSION can be used to specify the
       build version and api version respectively.  When building or
       installing appropriate symlinks are created if the platform supports
       symlinks and the linker supports so-names.  If only one of both is
       specified the missing is assumed to have the same version number.
 For
       executables VERSION can be used to specify the build version.  When
       building or installing appropriate symlinks are created if the
       platform supports symlinks.
...
> cheers,
> 
> Fathi
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 


-- 
Filipe Sousa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20060711/56e8d092/signature.pgp


More information about the CMake mailing list