[Cmake] Question about shared library versioning

Brian Bassett bbassett at bbassett.net
Thu Mar 27 14:03:13 EST 2003


Hello, 

I am looking at converting a project from the autoconf/automake/libtool
trio to CMake and have noticed what appears to be a rather large
deficiency in CMake.  It appears to be impossible to specify an soname
for the UNIX dynamic linker or any kind of versioning info (i.e. for
when a binary-incompatible change is made between two releases).  I have
been able to specify this kind of thing with libtool's --version-info
flag.

Right now, I simply get a "libnjs.so" with no soname when I set up an
ADD_LIBRARY line in the CMakeLists.txt file.  What I'm after is
something more like what libtool outputs:

lrwxrwxrwx    1 brian    brian          15 Dec  6 13:40 libnjs.so ->
libnjs.so.0.1.0
lrwxrwxrwx    1 brian    brian          15 Dec  6 13:40 libnjs.so.0 ->
libnjs.so.0.1.0
-rwxr-xr-x    1 brian    brian      800719 Feb 15  2001 libnjs.so.0.1.0

(It's not even necessary to have the third level (i.e. the .so.0.1.0);
the .so -> .so.0 link and the library libnjs.so.0 linked with an soname 
of libnjs.so.0 would suit my purposes enough to switch to CMake.)

I realize that all this is not possible for all platforms that CMake
supports (Windows comes to mind).  It might be nice to be able to encode
this information into the name of the dll file, for instance.

Thanks,

Brian Bassett
NJS Project Admin
http://www.bbassett.net/njs/





More information about the CMake mailing list