[CMake] install_name on Mac OS X

Chris Scharver scharver at gmail.com
Wed Aug 17 14:50:05 EDT 2005


Hello,

There were troubles a couple years ago [1] with the fact that
installing VTK on Mac OS X did not include the correct install_names
in the shared libraries. Does CMake yet provide the ability to specify
the install names? I couldn't find anything that indicated a solution.
I used some scripts modify the generated libraries after the build,
but it would be ideal if I could set the correct library names based
on the installation location.

It's a complex situation, as I think that libraries' install names
need to be set before they're linked against [2]. In effect, this
means that compilation must include the correct install location
before an install actually takes place. Maybe some kind of mapping
between an ADD_LIBRARY target and INSTALL_FILES destination could lead
to some kind of solution?

I'm perfectly happy just setting DYLD_LIBRARY_PATH or
DYLD_FALLBACK_LIBRARY_PATH, but it would be nice if I could compile
and install the library without the need for setting environment
variables. How have other people addressed this?

Thanks,
Chris

[1] http://www.vtk.org/pipermail/vtkusers/2003-May/067503.html
[2] http://godi.ocaml-programming.de/project-doc/finding_libraries.txt


More information about the CMake mailing list