Under Linux with CMake, I'm building a shared library libIex-2_0.so.10.0.1
ADD_LIBRARY (Iex SHARED
[*.cpp]
)
SET_TARGET_PROPERTIES(Iex PROPERTIES OUTPUT_NAME "Iex-2_0")
The 10.0.1 version is set with a call to
SET_TARGET_PROPERTIES ( Iex
PROPERTIES
VERSION 10.0.1
SOVERSION 10
)
In the installation folder, these links are created
libIex-2_0.so -> libIex-2_0.so.10
libIex-2_0.so.10 -> libIex-2_0.so.10.0.1
libIex-2_0.so.10.0.1
However, to match previous builds made with another build system, I need to add a legacy symbolic link, stripping the 2_0 suffix :
libIex.so -> libIex-2_0.so.10.0.1
What would be the proper CMake way to create such a link ?
add_custom_target
for install is not a good idea and generally should be avoided in preference to properinstall()
command flow. – Middleweight