[CMake] CMake and soversions in Linux
Pau Garcia i Quiles
pgquiles at elpauer.org
Tue Sep 25 06:41:33 EDT 2007
Hello,
I am trying to set soversion and information in a library in Linux
using CMake 2.4.7.
Assuming version = 2.0.6 and soversion = 0.0.0 (because it's going to
be the first soversioned release and we are not going to check the
history of the library and see where ABI compatibility was broken and
in what way), if I use:
SET_TARGET_PROPERTIES(
wt
PROPERTIES
VERSION 2.0.6
SOVERSION 0.0.0
)
I get this:
lrwxrwxrwx 1 root root 14 2007-09-24 09:56 /usr/lib/libwt.so ->
libwt.so.0.0.0
lrwxrwxrwx 1 root root 14 2007-09-24 09:56
/usr/lib/libwt.so.0.0.0 -> libwt.so.2.0.6
-rw-r--r-- 1 root root 1935368 2007-09-22 13:02 /usr/lib/libwt.so.2.0.6
Which is fine according to the libtool manual
(http://www.gnu.org/software/libtool/manual.html#Versioning) but it's
not the best way to provide versioning and soversioning information.
I'd like to follow section 6.4 in the libtool manual
(http://www.gnu.org/software/libtool/manual.html#Release-numbers),
thus getting this:
lrwxrwxrwx 1 root root 14 2007-09-24 09:56 /usr/lib/libwt.so ->
libwt-2.0.6.so.0.0.0
lrwxrwxrwx 1 root root 14 2007-09-24 09:56
/usr/lib/libwt-2.0.6.so.0 -> libwt-2.0.6.so.0.0.0
-rw-r--r-- 1 root root 1935368 2007-09-22 13:02 /usr/lib/libwt-2.0.6.so.0.0.0
I tried using OUTPUT_NAME in SET_TARGET_PROPERTIES:
SET_TARGET_PROPERTIES(
wt
PROPERTIES
VERSION 2.0.6
SOVERSION 0.0.0
OUTPUT_NAME wt-2.0.6
)
but the output is not what I expected:
lrwxrwxrwx 1 root root 20 2007-09-25 12:38
/usr/lib/libwt-2.0.6.so -> libwt-2.0.6.so.0.0.0
lrwxrwxrwx 1 root root 20 2007-09-25 12:38
/usr/lib/libwt-2.0.6.so.0.0.0 -> libwt-2.0.6.so.2.0.6
-rw-r--r-- 1 root root 1933696 2007-09-25 12:15 /usr/lib/libwt-2.0.6.so.2.0.6
How do I do to obtain filenames compliant with section 6.4 of the
libtool manual?
Thank you.
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
More information about the CMake
mailing list