Is there a way to separate components for a library with a SONAME and
the link?
For example if I do something like this:
add_library(foo ${foo_SRCS})
set_target_properties(foo PROPERTIES SOVERSION 1)
install(TARGETS foo
LIBRARY DESTINATION lib)
This will install
<prefix>/lib/libfoo.so.1
<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...
install(TARGETS foo
LIBRARY DESTINATION lib COMPONENT library NAMELINK_SKIP)
install(TARGETS foo
LIBRARY DESTINATION lib COMPONENT devel NAMELINK_ONLY)
I think it would be nice to be able to do something like
install(TARGETS foo
LIBRARY DESTINATION lib COMPONENT library
NAMELINK_COMPONENT devel)
What do you think?
Cheers,
Daniele
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers