[CMake] Setting install_name on Mac OSX 10.5

Gerrick Bivins gbivins at objectreservoir.com
Mon Oct 20 17:43:07 EDT 2008


Hello all,
I¹m trying to use swig (SWIG_ADD_MODULE, SWIG_LINK_LIBRARIES) to generate
java bindings for a library (contains a couple of sub libraries, similar to
VTK¹s setup). I haven¹t been able to load the generated shared libraries.
There were a couple of issues:
1. My jvm won¹t load shared libraries unless they are named
³lib{libName}.dylib². Default creates {libName}.so. I was able to modify the
properties of my of my targets to change the prefix to ³lib² and the suffix
to ³.dylib² and the libs began to load but
2. My jvm won¹t load the generated shared libraries because the install_name
is set to ³../../lib{libName}.dylib. If I manually change them to simply be
lib{libName}.dylib, the shared libs load.

I looked at this link:
http://www.cmake.org/pipermail/cmake/2006-October/011530.html

 And tried setting the ³INSTALL_NAME_DIR² property to ³², but this didn¹t
work.
Any suggestions? I¹m trying to simply create the shared libraries, not
bundles or  frameworks.
I¹m using cmake 2.6.2 on Mac OSX 10.5.
Gerrick


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081020/e767b955/attachment-0001.htm>


More information about the CMake mailing list