[vtk-developers] vtkGenerateJavaDependencies

John Biddiscombe john.biddiscombe at mirada-solutions.com
Fri May 9 11:22:10 EDT 2003


Hi all,

I've just checked in an addition to the custom CMake rule for Generate Java Dependencies. Being completely new to Java and wanting to build a set of Java wrappers (+jar archive) for some custom vtk classes I found that it only worked if I actually generated all the java stuff inside the vtk build tree. I found this troublesome because I wanted

vtk.jar (in vtk build tree)
vtkMine.jar (in my build tree, and containing only the new java classes)

I had to make my Cmakelists files jump through hoops to do this, by spoofing the VTK_BINARY_PATH etc and VTK_JAVA_HOME because these are hardcoded into some of the custom CMake rules. The only way I could get it to fully link (in Java afterwards) was by adding a USER_JAVA_CLASSPATH variable to my cmakelists and adding a check for this to vtkGenerateJavaDependencies so that the classpath was inserted (in this case, pointing from my build tree back to the vtk java build tree).

The commit I did was below

BUG: Add a USER_JAVA_CLASSPATH check so that if the user is building
Java wrappers outside of the vtk build tree, we can point the classpath
back to the vtk build tree and pick up the ancestor classes

I'd like to tweak the vtkGenerateJavaDependencies etc (vtkWrapJava2 also maybe) a bit more if at all possible, to remove any hard coded VTK_BINARY_DIR type references and instead use ones which can be user set.

Any thoughts?

JB



More information about the vtk-developers mailing list