2 # This module finds the languages supported by MITK, and 3 # present the option to enable support. 7 # This script is based on SimpleITK scripts. 10 option(WRAP_DEFAULT
"The default initial value for wrapping a language when it is detected on the system." OFF)
11 mark_as_advanced(WRAP_DEFAULT)
14 # Macro to set "_QUIET" and "_QUIET_LIBRARY" based on the first 15 # argument being defined and true, to either REQUIRED or QUIET. 18 if ( DEFINED ${var} AND ${var} )
19 set( _QUIET
"REQUIRED" )
23 if ( SITK_UNDEFINED_SYMBOLS_ALLOWED )
24 set( _QUIET_LIBRARY
"QUIET" )
26 set( _QUIET_LIBRARY ${_QUIET} )
31 # Setup the option for each language 34 #----------------------------------------------------------- 38 find_package ( PythonInterp ${_QUIET})
39 if ( PYTHONINTERP_FOUND )
40 find_package ( PythonLibs ${PYTHON_VERSION_STRING} EXACT ${_QUIET_LIBRARY} )
42 find_package ( PythonLibs ${_QUIET_LIBRARY} )
45 if ( PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND
46 AND (PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING) )
47 set( WRAP_PYTHON_DEFAULT ${WRAP_DEFAULT} )
49 set( WRAP_PYTHON_DEFAULT OFF )
52 option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )
54 if ( WRAP_PYTHON AND PYTHON_VERSION_STRING VERSION_LESS 2.7 )
55 message( WARNING
"Python version less than 2.7: \"${PYTHON_VERSION_STRING}\"." )
59 list( APPEND SITK_LANGUAGES_VARS
65 # Debian "jessie" has this additional variable required to match 67 if(PYTHON_INCLUDE_DIR2)
68 list( APPEND SITK_LANGUAGES_VARS