[vtkusers] Compiling VTK on OSX with .jnilib extensions

Thiébault Benoît dev at artenum.com
Tue Oct 19 04:25:02 EDT 2010


Hi everyone,

I'm trying to embed VTK in an OSGi bundle. I already successfully created a bundle that supports Linux and I am now concentrating on MacOSX.
It seems OSGi cannot deal with .dylib libraries and thus I would like to compile VTK with CMake creating .jnilib extensions.
Renaming the libraries is not sufficient, as their dependencies are stored with respect to the .dylib file.

For instance: 
> otool -L libvtkCommonJava.jnilib
libvtkCommonJava.jnilib:
	libvtkCommonJava.5.6.dylib (compatibility version 5.6.0, current version 5.6.1)
	libvtkCommon.5.6.dylib (compatibility version 5.6.0, current version 5.6.1)
	libvtksys.5.6.dylib (compatibility version 5.6.0, current version 5.6.1)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)

Can anyone point me what to do in CMake files to modify the library extensions?

Kind regards,

Ben


More information about the vtkusers mailing list