If you open the file &quot;<span class="Apple-style-span" style="font-family: Calibri, sans-serif; border-collapse: collapse; ">C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindSWIG.cmake</span>&quot; and read through it, you will see exactly where CMake is looking for SWIG.<div>
<br></div><div>It uses:</div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo"><span style="color: #a124a2">FIND_PROGRAM</span>(SWIG_EXECUTABLE swig)</p><div><font class="Apple-style-span" face="Menlo" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br>
</span></font></div><div>(which means it&#39;s only looking in the PATH...)</div></div><div><br></div><div>So you can either:</div><div><br></div><div>  set(SWIG_EXECUTABLE &quot;C:/full/path/to/swig.exe&quot;)</div><div>
  # (before FIND_PACKAGE(SWIG REQUIRED))</div><div><br></div><div>or:</div><div><br></div><div>  have swig.exe available somewhere in the PATH environment variable...</div><div><br></div><div><br></div><div>HTH,</div><div>
David</div><div><br></div><div><br><div class="gmail_quote">On Thu, Mar 18, 2010 at 3:32 PM, Caron, Michael C. (US SSA) <span dir="ltr">&lt;<a href="mailto:michael.caron@baesystems.com">michael.caron@baesystems.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div>
<font face="Calibri, sans-serif" size="2">
<div>I’m just starting to try and get CMake and SWIG to play nice together.  All I’ve done is add:</div>
<div> </div>
<div>FIND_PACKAGE(SWIG REQUIRED)</div>
<div> </div>
<div>to an existing CMakeLists.txt file that has worked before now.  With only this addition I get:</div>
<div> </div>
<div>CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindSWIG.cmake:68 (MESSAGE):</div>
<div>  SWIG was not found.  Please specify Swig executable location</div>
<div>Call Stack (most recent call first):</div>
<div>  SAIL/InterfaceLibrary/Source/CMakeLists.txt:34 (FIND_PACKAGE)</div>
<div> </div>
<div>The SWIG install basically says unzip the swig.exe anywhere you like.  I’ve tried putting it in c:, I’ve put it in c:/SWIG, I’ve added the directory to my path, I get the same error.  I know this is something stupid (like did you set your SWIG_LOCATION
environment variable), but neither CMake nor SWIG mention anything about where CMake is trying to find SWIG or even how it is trying to find SWIG.</div>
<div> </div>
<div>Can anyone give me a push in the right direction?</div>
<div> </div>
<div>-Mike</div>
<div><font face="Arial Black, sans-serif" size="5" color="#808080"><b>Nothing is impossible for the man who doesn&#39;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" target="_blank"><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> </div>
<div> </div>
<div> </div>
</font>
</div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>