[CMake] SWIG, Java and CMake

Daniel Blezek Blezek.Daniel at mayo.edu
Tue Jun 14 15:21:58 EDT 2011


We are using SWIG in the SimpleITK project (
https://github.com/SimpleITK/SimpleITK for the interested ) to generate Java
wrappings for our library.  The problem I¹m having is how to educate CMake
about Java.  SWIG generates a known-only-at-compile-time set of Java code.
CMake prefers to know in advance what source code needs to be compiled.

So far, our Java support has been cobbled together and is rather fragile,
and I¹m trying to make it more robust.  I pulled in the UseJava.cmake code
from the CMake repo (it¹s not in a release yet), but the add_jar command
likes to have a list of .java files.

Any suggestions about how to have CMake handle generated files like this?

Thanks,
-dan
-- 
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center

P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu

Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org
"It is more complicated than you think." -- RFC 1925

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110614/950afaa1/attachment.htm>


More information about the CMake mailing list