[CMake] Installing OSX Frameworks

Shead, Timothy tshead at sandia.gov
Wed Jul 23 15:20:59 EDT 2008


On 7/23/08 11:14 AM, "Mike Arthur" <mike at mikearthur.co.uk> wrote:

> On Wednesday 23 July 2008 16:06:21 Mike Jackson wrote:
>> What would probably be nice at this point would be an example OS X
>> centric project that uses all these ideas with code explanations for
>> each step.
> I think what would be nice is if CMake did this for us! If this is fairly
> standard when packaging on OSX then it would be good if there were some
> integration for this, even if we had to specify the relocations manually.

That's definitely the long-term intent; in the meantime, an intermediate
solution would be to do the following:

INSTALL(CODE "EXECUTE_PROCESS(COMMAND install_name_tool -change
/path/to/external.dylib @executable/external.dylib
\${CMAKE_INSTALL_PREFIX}/bin/my_binary)")

 ... for each combination of binary / external dependency.  For a
reasonably-large project this list gets painfully long, but it does give a
sense of the scope of the problem ;)

One improvement on this approach might be a wrapper for install_name_tool
that would do regex replacements - many similar install names could be
altered in one-step, or one-at-a-time based on developer preference.

Cheers,
Tim

--
Timothy M. Shead
Scalable Analytics & Visualization (1424)
Sandia National Laboratories
505-284-0139





More information about the CMake mailing list