<HTML>
<HEAD>
<TITLE>SWIG, Java and CMake</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>We are using SWIG in the SimpleITK project ( <a href="https://github.com/SimpleITK/SimpleITK">https://github.com/SimpleITK/SimpleITK</a> for the interested ) to generate Java wrappings for our library. &nbsp;The problem I&#8217;m having is how to educate CMake about Java. &nbsp;SWIG generates a known-only-at-compile-time set of Java code. &nbsp;CMake prefers to know in advance what source code needs to be compiled.<BR>
<BR>
So far, our Java support has been cobbled together and is rather fragile, and I&#8217;m trying to make it more robust. &nbsp;I pulled in the UseJava.cmake code from the CMake repo (it&#8217;s not in a release yet), but the add_jar command likes to have a list of .java files.<BR>
<BR>
Any suggestions about how to have CMake handle generated files like this?<BR>
<BR>
Thanks,<BR>
-dan<BR>
-- <BR>
<B>Daniel Blezek, PhD<BR>
</B>Medical Imaging Informatics Innovation Center<BR>
<BR>
P 127 or (77) 8 8886<BR>
T 507 538 8886<BR>
E <a href="blezek.daniel@mayo.edu">blezek.daniel@mayo.edu</a><BR>
<BR>
Mayo Clinic<BR>
200 First St. S.W.<BR>
Harwick SL-44<BR>
Rochester, MN 55905<BR>
mayoclinic.org<BR>
&quot;It is more complicated than you think.&quot; -- RFC 1925<BR>
</SPAN></FONT>
</BODY>
</HTML>