2005-12-14 21:51:08 +03:00
|
|
|
# - Find python interpreter
|
2005-07-15 16:36:33 +04:00
|
|
|
# This module finds if Python interpreter is installed and determines where the
|
|
|
|
# executables are. This code sets the following variables:
|
|
|
|
#
|
2005-12-15 22:17:43 +03:00
|
|
|
# PYTHONINTERP_FOUND - Was the Python executable found
|
|
|
|
# PYTHON_EXECUTABLE - path to the Python interpreter
|
2005-07-15 16:36:33 +04:00
|
|
|
#
|
|
|
|
|
2009-10-02 01:21:28 +04:00
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2005-2009 Kitware, Inc.
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
|
|
|
# (To distributed this file outside of CMake, substitute the full
|
|
|
|
# License text for the above reference.)
|
|
|
|
|
2005-07-15 16:36:33 +04:00
|
|
|
FIND_PROGRAM(PYTHON_EXECUTABLE
|
2007-08-30 21:35:54 +04:00
|
|
|
NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
|
2005-07-15 16:36:33 +04:00
|
|
|
PATHS
|
2009-01-10 16:46:37 +03:00
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
2006-09-27 21:30:18 +04:00
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
2005-07-15 19:48:04 +04:00
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
2005-07-15 16:36:33 +04:00
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]
|
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]
|
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]
|
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]
|
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]
|
|
|
|
)
|
|
|
|
|
2007-07-18 21:56:45 +04:00
|
|
|
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
2007-07-23 17:49:52 +04:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE)
|
2007-07-23 19:22:14 +04:00
|
|
|
|
|
|
|
MARK_AS_ADVANCED(PYTHON_EXECUTABLE)
|
|
|
|
|