[CMake] How do folks work with rpath on OS X using cmake?
clinton at elemtech.com
Mon Apr 11 17:15:22 EDT 2011
On Monday, April 11, 2011 01:49:21 pm John R. Cary wrote:
> A library libA.dylib is found somewhere in the building of
> executable B. Doing the typical link, otool -L shows that B
> or possibly
> I want B to run from either the build directory or the
> installation directory, which I want to be portable.
> A possible solution is to have libA.dylib encoded into B as:
> and then to put @loader_path/ and /A/installdir/lib
> into the rpath of B, and finally to install libA.dylib
> alongside B.
> What is the best way to get this done using CMake?
> What other approaches are there to this basic problem?
> Thx.....John Cary
You could do something like this in your CMakeLists.txt file.
Or use BundleUtilities script when you create an install.
Elemental Technologies, Inc
Computational Simulation Software, LLC
More information about the CMake