[CMake] Version in name of shared library

Eric Noulard eric.noulard at gmail.com
Thu Sep 6 04:03:50 EDT 2012


2012/9/6 Anton Sibilev <anton.sibilev at gmail.com>:
> 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?

set_target_properties(xxx PROPERTIES VERSION 1.0.0 SOVERSION 1)

see:
cmake --help-property SOVERSION

> Point is not to create link or copy libxxx.so -> libxxx.so.1, but to create
> it initially.

VERSION mangle the name with version
SOVERSION creates the link

You can drive the [output] name of a target (either library or executable)
using OUTPUT_NAME property
cmake --help-property OUTPUT_NAME

But I don't think you c
-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list