[CMake] Emulating libtool's -version-info with CMake?

Eric Noulard eric.noulard at gmail.com
Tue Dec 9 11:41:39 EST 2008


2008/12/9 Shlomi Fish <shlomif at iglu.org.il>:
> Hi all!
>
> I have a .so library (for Unix/Windows) that I maintain several versions of.
> I'd like to have a symbolic links structure similar to
> libtool's -version-info :
>
> http://www.ensta.fr/~diam/dev/online/autoconf/autobook/autobook_91.html
>
> The problem is that when doing ADD_LIBRARY, the resultant .so is just .so with
> no versions inside. How can I emulate the behaviour of libtool in this regard
> using CMake?

SET_TARGET_PROPERTIES(<yourlib> PROPERTIES VERSION 1.0.0 SOVERSION 1)

see
http://www.cmake.org/cmake/help/cmake2.6docs.html#prop_tgt:SOVERSION


-- 
Erk


More information about the CMake mailing list