[CMake] Version in name of shared library

Michael Wild themiwi at gmail.com
Thu Sep 6 04:01:36 EDT 2012


On 09/06/2012 09:43 AM, Anton Sibilev wrote:
> Hi all!
> 
> I'm making shared library with add_library(xxx SHARED xxx.c) and as
> result I got 'libxxx.so'.
> I want to create lib with name like 'libxxx.so.1', can you please help,
> how to make this?
> 
> Point is not to create link or copy libxxx.so -> libxxx.so.1, but to
> create it initially.
> 
> Thanks!

You need to set the VERSION and SOVERSION target properties:

http://cmake.org/cmake/help/v2.8.8/cmake.html#command:set_target_properties

Michael



More information about the CMake mailing list