[CMake] Framework Installation Directory / Framework copying

Michael Jackson mike.jackson at bluequartz.net
Tue Dec 8 23:48:14 EST 2009


http://www.cmake.org/Wiki/BundleUtilitiesExample

Might Help

Mike Jackson

On Dec 8, 2009, at 5:11 PM, Glenn Hughes wrote:

> Hi all,
>
> Does anyone have any experience with how to copy a built framework
> into the application bundle?
>
> In Xcode we set the Installation Directory of the Framework to
> @executable_path/../Frameworks/, then as a post-link phase of building
> the app we run a python script to copy the built framework into the
> application bundle.
> I can set up the dependency between my app target and my framework
> target, and if I leave everything alone the app even runs.
> However, if  I move the framework into the app bundle by hand, it
> won't launch because it can't find the framework. This is because the
> Installation Directory is being set to the BINARY_DIR location.
>
> If I by hand fix the Xcode project's Installation Directory to
> @executable_path/../Frameworks/ and rebuild, (and move it to the
> correct location by hand) everything works. (So, I know my suspicions
> about what needs to be done are correct).
>
> So, does anyone know how to set a Framework's Installation Directory
> parameter via CMake?
>
> Part of my problem in researching this problem is that "Installation
> Directory" is an overloaded term in the CMake lexicon. I'm talking
> about the OS X Framework attribute here, not the CPack or Squish
> variables.
>
> Also, any idea about the best way to do the Framework copy? I could
> probably just re-use our python script, but maybe there's a cleaner
> CMake way of doing something like this...
>
> Thanks in advance...
> Glenn



More information about the CMake mailing list