[CMake] symbolic linking at install
Tim Schooley
tim at sbdev.net
Wed Aug 22 05:07:13 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi folks,
I know there are already a few posts on this subject - I've tried to
take what has been said to achieve my goal: for the install target, I
would like to link my libraries as follows (clearly, this is for unix only):
libabc.so -> libabc.so.1
libabc.so -> libabc.so.1.0
libabc.so -> libabc.so.1.0.0
And so forth.
The current code seems not to work :(
Install ( TARGETS abc
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBRARY_PATH}
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ WORLD_READ
WORLD_EXECUTE )
Install ( CODE "MESSAGE(\"Linking libabc.so\")"
CODE "EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E create_symlink
${PROJECT_INSTALL_LIBRARY_PATH}/libabc.so
${PROJECT_INSTALL_LIBRARY_PATH}/libabc.so.1 )" )
Have I completely misunderstood the usage of the Install(CODE ..)
command ? Also, placing the linking code _after_ the initial install
should guarantee the linking is run after the library is installed, yes ?
I also tried printing out a result variable from the link command, but
it was empty 0_0
Thanks for any help!
Kind regards,
Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGy/zBChPkLPgrpHQRAkOiAJ9EmGtvRF02G3dvl+LEI8+oiQUsRACcCHxu
Q5OEGMU+aXZgWoxqBvScsxw=
=PPXJ
-----END PGP SIGNATURE-----
More information about the CMake
mailing list