5 # Find Jython components such as the interpreter. 7 # This module uses find_package to look for these components using the 8 # specialized Find modules named FindJythonInterp.cmake. 10 #============================================================================= 11 # Copyright 2016 Andreas Schuh <andreas.schuh.84@gmail.com> 13 # Distributed under the OSI-approved BSD License (the "License"); 14 # see accompanying file Copyright.txt for details. 16 # This software is distributed WITHOUT ANY WARRANTY; without even the 17 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 # See the License for more information. 19 #============================================================================= 20 # (To distribute this file outside of CMake, substitute the full 21 # License text for the above reference.) 23 # ------------------------------------------------------------------------------ 24 # Components to look for 28 set (Jython_FIND_COMPONENTS Interp)
31 foreach (_Jython_COMPONENT IN LISTS Jython_FIND_COMPONENTS)
32 if (NOT _Jython_COMPONENT MATCHES
"^(Interp)$")
33 message (FATAL_ERROR
"Invalid Jython COMPONENTS argument: ${_Jython_COMPONENT}")
35 set (_Jython_FIND_${_Jython_COMPONENT} TRUE)
38 # ------------------------------------------------------------------------------ 40 if (NOT Jython_FIND_QUIETLY)
42 if (NOT Jython_FIND_REQUIRED)
45 message(STATUS
"${_Jython_FIND_STATUS}...")
48 # ------------------------------------------------------------------------------ 49 # Look for Jython components 50 set (_Jython_REQUIRED_VARS)
55 list (APPEND _Jython_REQUIRED_VARS JYTHON_EXECUTABLE)
58 # ------------------------------------------------------------------------------ 59 # Handle QUIET, REQUIRED, and [EXACT] VERSION arguments and set Jython_FOUND 60 if (_Jython_REQUIRED_VARS)
61 include(FindPackageHandleStandardArgs)
62 find_package_handle_standard_args(Jython
63 REQUIRED_VARS ${_Jython_REQUIRED_VARS}
64 VERSION_VAR JYTHON_VERSION_STRING
72 # ------------------------------------------------------------------------------ 74 if (NOT Jython_FIND_QUIETLY)
76 if (JYTHON_VERSION_STRING)
77 message(STATUS
"${_Jython_FIND_STATUS}... - found v${JYTHON_VERSION_STRING}")
86 # ------------------------------------------------------------------------------ 87 # Unset local variables 88 unset (_Jython_FIND_Interp) 89 unset (_Jython_FIND_STATUS) 90 unset (_Jython_COMPONENT) 91 unset (_Jython_REQUIRED_VARS)
cmake Jython_Interp_FOUND
cmake Jython_FIND_COMPONENTS
cmake _Jython_FIND_STATUS
macro find_package()
Overloaded find_package() command.
cmake _Jython_FIND_Interp