[CMake] CPack and install_name_tool on the Mac

Brad King brad.king at kitware.com
Fri Jun 16 13:47:00 EDT 2006


Karl Merkley wrote:
> Does CPack have any ability to help with the install_name_tool on the  
> Mac?  Mac applications avoid DLL hell by creating an application  bundle 
> that is really a directory structure that includes the  application, the 
> resources, and the shared libraries used by the  application.   My 
> understanding is that the install_name_tool  essentially modifies the 
> RPATH of the distributed application so that  it looks for the shared 
> libraries in the bundle rather than some  random location.   I have a 
> script that I run to make this all work,  but it has to be modified as 
> libraries change.  Or, if I somehow  forget to run this step the whole 
> distribution is bad.   Does CPack  help with this?

Look at the SET_TARGET_PROPERTIES command documentation:

   cmake --help-command SET_TARGET_PROPERTIES

In CMake 2.4 there is an INSTALL_NAME_DIR property that you can use to 
control the install_name of the installed library or executable.

-Brad


More information about the CMake mailing list