mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Newer versions of SWIG drop support for some target languages, and some forks of SWIG (such as for Fortran and MATLAB) aren't supported by the mainline version of SWIG. Swig versions as old as 1.3.6 (circa 2001) and possibly older use the same format for listing available wrappers "%-15s - Generate %s wrappers", so component detection should be quite reliable.
10 lines
304 B
CMake
10 lines
304 B
CMake
# Note that 'perl' will not be found because it is not lowercase.
|
|
find_package(SWIG REQUIRED
|
|
COMPONENTS java
|
|
OPTIONAL_COMPONENTS python PERL)
|
|
|
|
message(STATUS "SWIG_VERSION='${SWIG_VERSION}'")
|
|
foreach(_lang java python PERL)
|
|
message(STATUS "SWIG_${_lang}_FOUND=${SWIG_${_lang}_FOUND}")
|
|
endforeach()
|