I can suggest all sorts of ways to set the install_name of the libraries BUT I would rather figure out _why_ the swig generated libraries are getting the "../../lib" prefix in the first place.

I don't have any experience with swig so I can only guess at this point. Does swig have its own settings for Install_name on OS X?

Also, which libraries are not correct:
  The c/c++ libraries?
  The generated jni libraries?

All? Both?

_________________________________________________________
Mike Jackson                  [EMAIL PROTECTED]
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

On Oct 20, 2008, at 5:43 PM, Gerrick Bivins wrote:

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:
• 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 • 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

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to