diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-30 16:11:02 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-30 16:11:02 (GMT) |
commit | 257daa4635ed9b88035c84c5cb1fcc689268a949 (patch) | |
tree | 1bec9e0ec65c8e8bcf37c50d373013dfdd2aab17 /Modules/FindSWIG.cmake | |
parent | 858564fb103666adc26d3e8077cbded1fcbe0b18 (diff) | |
download | CMake-257daa4635ed9b88035c84c5cb1fcc689268a949.zip CMake-257daa4635ed9b88035c84c5cb1fcc689268a949.tar.gz CMake-257daa4635ed9b88035c84c5cb1fcc689268a949.tar.bz2 |
ENH: Initial import of swig. Start working towards Bug #749 - Add swig support module to cmake
Diffstat (limited to 'Modules/FindSWIG.cmake')
-rw-r--r-- | Modules/FindSWIG.cmake | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake new file mode 100644 index 0000000..6116b6c --- /dev/null +++ b/Modules/FindSWIG.cmake @@ -0,0 +1,35 @@ +SET(SWIG_FOUND FOOBAR) +FIND_PATH(SWIG_DIR + SWIGConfig.cmake + /usr/share/swig1.3 + /usr/local/share/swig1.3) +FIND_PATH(SWIG_DIR + swig.swg + /usr/share/swig1.3 + /usr/local/share/swig1.3) +IF(EXISTS ${SWIG_DIR}) + IF("x${SWIG_DIR}x" MATCHES "^x${CMAKE_ROOT}/Modulesx$") + MESSAGE("SWIG_DIR should not be modules subdirectory of CMake") + ENDIF("x${SWIG_DIR}x" MATCHES "^x${CMAKE_ROOT}/Modulesx$") + + IF(EXISTS ${SWIG_DIR}/SWIGConfig.cmake) + INCLUDE(${SWIG_DIR}/SWIGConfig.cmake) + ELSE(EXISTS ${SWIG_DIR}/SWIGConfig.cmake) + FIND_PROGRAM(SWIG_EXECUTABLE + NAMES swig-1.3 swig + PATHS /usr/bin /usr/local/bin) + SET(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake) + ENDIF(EXISTS ${SWIG_DIR}/SWIGConfig.cmake) +ENDIF(EXISTS ${SWIG_DIR}) + +IF("x${SWIG_FOUND}x" MATCHES "^xFOOBARx$") + SET(SWIG_FOUND 0) + IF(SWIG_DIR) + IF(EXISTS ${SWIG_USE_FILE}) + IF(EXISTS ${SWIG_EXECUTABLE}) + SET(SWIG_FOUND 1) + ENDIF(EXISTS ${SWIG_EXECUTABLE}) + ENDIF(EXISTS ${SWIG_USE_FILE}) + ENDIF(SWIG_DIR) +ENDIF("x${SWIG_FOUND}x" MATCHES "^xFOOBARx$") + |