<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Alright so I&#8217;ve got some very basic skeleton stuff put together using CMake and SWIG.&nbsp; I followed the Python example and poked and prodded at it to make a Java version of the same thing.&nbsp; Then added my stuff to it.&nbsp; So I&#8217;ve got:</div>
<div>&nbsp;</div>
<div>FIND_PACKAGE(SWIG REQUIRED)</div>
<div>INCLUDE(${SWIG_USE_FILE})</div>
<div>&nbsp;</div>
<div>FIND_PACKAGE(Java REQUIRED)</div>
<div>INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})</div>
<div>&nbsp;</div>
<div>INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})</div>
<div>&nbsp;</div>
<div>SET(CMAKE_SWIG_FLAGS &quot;&quot;)</div>
<div>&nbsp;</div>
<div>SET(SWIG_SOURCES </div>
<div>&nbsp; &lt;BUNCH OF .H FILES WITH EMBEDDED SWIG HEADER INFO&gt;</div>
<div>)</div>
<div>&nbsp;</div>
<div>SET_SOURCE_FILES_PROPERTIES(${SWIG_SOURCES} PROPERTIES CPLUSPLUS ON)</div>
<div>SET_SOURCE_FILES_PROPERTIES(${SWIG_SOURCES} PROPERTIES SWIG_FLAGS &quot;-includeall&quot;)</div>
<div>SWIG_ADD_MODULE(&lt;MYWRAPPED_LIB_DLL&gt; Java ${SWIG_SOURCES})</div>
<div>SWIG_LINK_LIBRARIES(&lt;MYWRAPPED_LIB_DLL&gt; &lt;LIB_TO_BE_WRAPPED&gt;)</div>
<div>&nbsp;</div>
<div>Each of the .h files has a special header of this form embedded in them:</div>
<div>&nbsp;</div>
<div>//variousandsundry.h &#8211; Does various and sundry things</div>
<div>#ifdef SWIG</div>
<div>%module &lt;MYWRAPPED_LIB_DLL&gt;</div>
<div>%{</div>
<div>#include &quot;variousandsundry.h&quot;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %}</div>
<div>#endif //SWIG</div>
<div>&nbsp;</div>
<div>Void foo();</div>
<div>Int bat();</div>
<div>&nbsp;</div>
<div>I sort of expected to see various *.java files created (like variousandsundry.java) and I expected to see a MYWRAPPED_LIB_DLL.dll and a MYWRAPPED_LIB_DLL.jar.&nbsp; All I can easily find is the MYWRAPPED_LIB_DLL.dll.&nbsp; Am I missing something or am I setting
my expectations too high.&nbsp; </div>
<div>&nbsp;</div>
<div>Basically I want to create a java interface to a c&#43;&#43; lib using SWIG as part of my CMake build process.&nbsp; This library has been successfully created before using SWIG so I&#8217;m sure it can be done.&nbsp; It&#8217;s just a matter of figuring out how&nbsp; integrate it with
the CMake process.</div>
<div>&nbsp;</div>
<div>Michael Caron</div>
<div>&nbsp;</div>
<div><font face="Arial Black, sans-serif" size="5" color="#808080"><b>Nothing is impossible for the man who doesn't have to do it himself.</b><font face="Calibri, sans-serif" size="2" color="#000000">
<br>

</font><font face="Courier New, monospace" size="2" color="#000000">-A. H. Weiler</font><font face="Calibri, sans-serif" size="2" color="#000000">
<br>

</font><font face="Arial, sans-serif" size="2" color="#800000"><i><b>Ops Analysis (BAE Internal) wiki site:</b></i></font><font face="Calibri, sans-serif" size="2" color="#000000"><i><b> </b></i></font><a href="http://bluas0752/display/EWOA/Home"><font face="Arial, sans-serif" size="2" color="#0000FF"><u><i><b>http://bluas0752/display/EWOA/Home</b></i></u></font></a><font face="Calibri, sans-serif" size="2" color="#000000">
</font></font></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</font>
</body>
</html>