summaryrefslogtreecommitdiff
path: root/Modules/FindPythonInterp.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-15 08:36:33 -0400
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-15 08:36:33 -0400
commit28d4d449f9134f56b3cf1b52a29b1c38f56c2ef3 (patch)
tree7e254723a2da405913baed0ab60d32fdfc4096ee /Modules/FindPythonInterp.cmake
parent2001d2f76128a880773ef37fd7053a4969b93b13 (diff)
downloadcmake-28d4d449f9134f56b3cf1b52a29b1c38f56c2ef3.tar.gz
ENH: Initial import
Diffstat (limited to 'Modules/FindPythonInterp.cmake')
-rw-r--r--Modules/FindPythonInterp.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
new file mode 100644
index 0000000000..b9e992eabc
--- /dev/null
+++ b/Modules/FindPythonInterp.cmake
@@ -0,0 +1,20 @@
+#
+# This module finds if Python interpreter is installed and determines where the
+# executables are. This code sets the following variables:
+#
+# PYTHONINTERP_FOUND - Set to true when Python executable is found
+# PYTHON_EXECUTABLE - The full path to the Python interpreter
+#
+
+FIND_PROGRAM(PYTHON_EXECUTABLE
+ NAMES python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
+ PATHS
+ [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]
+ )
+
+