[CMake] Post install scripts for STGZ CPack target

KSpam keesling_spam at cox.net
Fri Feb 20 12:26:31 EST 2009


> Is it possible to have a script run after the STGZ install?
> I want to run install_name_tool on a mac after some libraries are installed
> in order to encode the installed path into the library names.
> I'll need to be able to pass the installation directory to the script.

You can copy CPack.STGZ_Header.sh.in from the CMake modules directory and copy 
it to a custom location.  You can then edit the script to do whatever you 
need it to do.  As long as you prepend the location for this modified script 
to CMAKE_MODULE_PATH prior to calling CPack, CPack will use you modified 
script instead of the default.

Hope This Helps,

More information about the CMake mailing list