[cmake-developers] Separate components for library and .so link
Daniele E. Domenichelli
ddomenichelli at drdanz.it
Tue Dec 23 06:24:58 EST 2014
Is there a way to separate components for a library with a SONAME and
For example if I do something like this:
set_target_properties(foo PROPERTIES SOVERSION 1)
LIBRARY DESTINATION lib)
This will install
<prefix>/lib/libfoo.so -> libfoo.so.1
When packaging (at least for Debian and derived distributions), the .so
link is considered part of the "-dev" package (and installed with the
header files), while the library is part of the library package.
Is there a way to separate these 2 components with just one install command?
As far as I understand, it is possible to install the target twice using
NAMELINK_SKIP and NAMELINK_ONLY, but that seems a bit too redundant to me...
LIBRARY DESTINATION lib COMPONENT library NAMELINK_SKIP)
LIBRARY DESTINATION lib COMPONENT devel NAMELINK_ONLY)
I think it would be nice to be able to do something like
LIBRARY DESTINATION lib COMPONENT library
What do you think?
More information about the cmake-developers