summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-11 14:11:39 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-11 14:11:42 (GMT)
commit85d2434826f464de06f6a1fec6821605b736d1fb (patch)
treea4eb84eef340201d5efe9be93b219918b28bafa5
parente086b0e081d10f491dfe67fe065586423524942a (diff)
parent9d15d3c7486ae2d60709617f3fac9ac8bfb289b3 (diff)
downloadCMake-85d2434826f464de06f6a1fec6821605b736d1fb.zip
CMake-85d2434826f464de06f6a1fec6821605b736d1fb.tar.gz
CMake-85d2434826f464de06f6a1fec6821605b736d1fb.tar.bz2
Merge topic 'FindPythonInterp-3.6-windows'
9d15d3c7 FindPythonInterp: Add `-32` and `-64` registry entry variants Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !675
-rw-r--r--Modules/FindPythonInterp.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index f255246..64b98a8 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -91,12 +91,15 @@ unset(_PYTHON3_VERSIONS)
if(NOT PYTHON_EXECUTABLE)
foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS)
set(_Python_NAMES python${_CURRENT_VERSION})
- if(WIN32)
+ if(CMAKE_HOST_WIN32)
list(APPEND _Python_NAMES python)
endif()
find_program(PYTHON_EXECUTABLE
NAMES ${_Python_NAMES}
- PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
+ PATHS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-32\\InstallPath]
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-64\\InstallPath]
)
endforeach()
endif()