yolobs-studio/cmake/Modules/FindSwigDeps.cmake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
892 B
CMake
Raw Normal View History

2020-10-01 20:15:25 +00:00
if(DEFINED SWIGDIR)
list(APPEND CMAKE_PREFIX_PATH "${SWIGDIR}")
elseif(DEFINED ENV{SWIGDIR})
list(APPEND CMAKE_PREFIX_PATH "$ENV{SWIGDIR}")
endif()
2018-02-19 19:54:37 +00:00
if(WIN32)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(_LIB_SUFFIX 64)
ELSE()
SET(_LIB_SUFFIX 32)
ENDIF()
FIND_PATH(SWIG_DIR
NAMES swigrun.i
HINTS
ENV SwigPath${_LIB_SUFFIX}
ENV SwigPath
ENV DepsPath${_LIB_SUFFIX}
ENV DepsPath
${SwigPath${_LIB_SUFFIX}}
${SwigPath}
${DepsPath${_LIB_SUFFIX}}
${DepsPath}
${_PYTHON_INCLUDE_DIRS}
PATH_SUFFIXES
../swig/Lib
swig/Lib
)
find_program(SWIG_EXECUTABLE
NAMES swig
HINTS
ENV SwigPath${_LIB_SUFFIX}
ENV SwigPath
ENV DepsPath${_LIB_SUFFIX}
ENV DepsPath
${SwigPath${_LIB_SUFFIX}}
${SwigPath}
${DepsPath${_LIB_SUFFIX}}
${DepsPath}
${_PYTHON_INCLUDE_DIRS}
PATH_SUFFIXES
../swig
swig
)
endif()
find_package(SWIG QUIET 2)