2004-04-30 16:11:02 +00:00
|
|
|
SET(SWIG_FOUND FOOBAR)
|
|
|
|
FIND_PATH(SWIG_DIR
|
|
|
|
SWIGConfig.cmake
|
|
|
|
/usr/share/swig1.3
|
2004-06-28 13:08:13 +00:00
|
|
|
/usr/lib/swig1.3
|
2004-04-30 16:11:02 +00:00
|
|
|
/usr/local/share/swig1.3)
|
|
|
|
FIND_PATH(SWIG_DIR
|
|
|
|
swig.swg
|
|
|
|
/usr/share/swig1.3
|
2004-06-28 13:08:13 +00:00
|
|
|
/usr/lib/swig1.3
|
2004-04-30 16:11:02 +00:00
|
|
|
/usr/local/share/swig1.3)
|
|
|
|
IF(EXISTS ${SWIG_DIR})
|
2004-06-28 13:08:13 +00:00
|
|
|
IF("x${SWIG_DIR}x" STREQUAL "x${CMAKE_ROOT}/Modulesx")
|
2004-04-30 16:11:02 +00:00
|
|
|
MESSAGE("SWIG_DIR should not be modules subdirectory of CMake")
|
2004-06-28 13:08:13 +00:00
|
|
|
ENDIF("x${SWIG_DIR}x" STREQUAL "x${CMAKE_ROOT}/Modulesx")
|
2004-04-30 16:11:02 +00:00
|
|
|
|
|
|
|
IF(EXISTS ${SWIG_DIR}/SWIGConfig.cmake)
|
|
|
|
INCLUDE(${SWIG_DIR}/SWIGConfig.cmake)
|
2004-06-29 14:22:06 +00:00
|
|
|
SET(SWIG_FOUND 1)
|
2004-04-30 16:11:02 +00:00
|
|
|
ELSE(EXISTS ${SWIG_DIR}/SWIGConfig.cmake)
|
|
|
|
FIND_PROGRAM(SWIG_EXECUTABLE
|
|
|
|
NAMES swig-1.3 swig
|
2004-04-30 17:41:06 +00:00
|
|
|
PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin )
|
2004-04-30 16:11:02 +00:00
|
|
|
SET(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake)
|
|
|
|
ENDIF(EXISTS ${SWIG_DIR}/SWIGConfig.cmake)
|
|
|
|
ENDIF(EXISTS ${SWIG_DIR})
|
|
|
|
|
2004-06-28 13:08:13 +00:00
|
|
|
IF("x${SWIG_FOUND}x" STREQUAL "xFOOBARx")
|
2004-04-30 16:11:02 +00:00
|
|
|
SET(SWIG_FOUND 0)
|
2004-06-28 13:08:13 +00:00
|
|
|
IF(EXISTS ${SWIG_DIR})
|
2004-04-30 16:11:02 +00:00
|
|
|
IF(EXISTS ${SWIG_USE_FILE})
|
|
|
|
IF(EXISTS ${SWIG_EXECUTABLE})
|
|
|
|
SET(SWIG_FOUND 1)
|
|
|
|
ENDIF(EXISTS ${SWIG_EXECUTABLE})
|
|
|
|
ENDIF(EXISTS ${SWIG_USE_FILE})
|
2004-06-28 13:08:13 +00:00
|
|
|
ENDIF(EXISTS ${SWIG_DIR})
|
|
|
|
IF(NOT ${SWIG_FOUND})
|
|
|
|
IF(${SWIG_FIND_REQUIRED})
|
|
|
|
MESSAGE(FATAL_ERROR "Swig was not found on the system. Please specify the location of Swig.")
|
|
|
|
ENDIF(${SWIG_FIND_REQUIRED})
|
|
|
|
ENDIF(NOT ${SWIG_FOUND})
|
|
|
|
ENDIF("x${SWIG_FOUND}x" STREQUAL "xFOOBARx")
|