I'm building two packages in a distribution:
- runtime shared library package
- dev libary package
The problem is to include a correct symlink into any of them. Currently I use:
set_target_properties(mylib PROPERTIES
SOVERSION "${PROJECT_VERSION_MAJOR}"
VERSION "${PROJECT_VERSION}")
and when specifying the following CPack
configuration:
install (TARGETS mylib
LIBRARY
DESTINATION /usr/lib
COMPONENT runtime)
install (TARGETS mylib
LIBRARY
DESTINATION /usr/lib
COMPONENT dev)
install (DIRECTORY include/
DESTINATION /usr/include/mylib
COMPONENT dev)
the runtime shared library package then contains the following symlink chain:
/usr/lib/libmylib.so -> libmylib.so.0
/usr/lib/libmylib.so.0 -> libmylib.so.0.0.1
/usr/lib/libmylib.so.0.0.1
The problem is /usr/lib/libmylib.so -> libmylib.so.0
is redundant in the runtime shared library package since it is only necessary when building a binary that uses this libmylib
.
Question: Is there a way to excelude that /usr/lib/libmylib.so -> libmylib.so.0
symlink from runtime shared library package?