If you open the file "C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindSWIG.cmake" and read through it, you will see exactly where CMake is looking for SWIG.
It uses: FIND_PROGRAM(SWIG_EXECUTABLE swig) (which means it's only looking in the PATH...) So you can either: set(SWIG_EXECUTABLE "C:/full/path/to/swig.exe") # (before FIND_PACKAGE(SWIG REQUIRED)) or: have swig.exe available somewhere in the PATH environment variable... HTH, David On Thu, Mar 18, 2010 at 3:32 PM, Caron, Michael C. (US SSA) < michael.ca...@baesystems.com> wrote: > I’m just starting to try and get CMake and SWIG to play nice together. > All I’ve done is add: > > FIND_PACKAGE(SWIG REQUIRED) > > to an existing CMakeLists.txt file that has worked before now. With only > this addition I get: > > CMake Error at C:/Program Files/CMake > 2.8/share/cmake-2.8/Modules/FindSWIG.cmake:68 (MESSAGE): > SWIG was not found. Please specify Swig executable location > Call Stack (most recent call first): > SAIL/InterfaceLibrary/Source/CMakeLists.txt:34 (FIND_PACKAGE) > > 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. > > Can anyone give me a push in the right direction? > > -Mike > *Nothing is impossible for the man who doesn't have to do it himself.* > -A. H. Weiler > *Ops Analysis (BAE Internal) wiki site:** ** > http://bluas0752/display/EWOA/Home* <http://bluas0752/display/EWOA/Home> > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake