summaryrefslogtreecommitdiff
path: root/Modules/FindPythonInterp.cmake
diff options
context:
space:
mode:
authorWerner Palfinger <werner.palfinger@gmail.com>2018-01-19 06:13:03 -0500
committerWerner Palfinger <werner.palfinger@gmail.com>2018-01-19 06:13:03 -0500
commita7d344be712cddd906f066809896c208ae99702c (patch)
tree3c41da94e3b4616e1f317756c46d8593ab3c1bcd /Modules/FindPythonInterp.cmake
parentbe2f0509037880a94f487867bee088a231054f4b (diff)
downloadcmake-a7d344be712cddd906f066809896c208ae99702c.tar.gz
FindPythonInterp: support single-user installs on Windows
CMake currently searches in HKEY_LOCAL_MACHINE. According to PEP 514, single-user installs are registered in HKEY_CURRENT_USER See also FindPythonLibs.cmake
Diffstat (limited to 'Modules/FindPythonInterp.cmake')
-rw-r--r--Modules/FindPythonInterp.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 64b98a8791..3ef8e9f190 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -100,6 +100,9 @@ if(NOT PYTHON_EXECUTABLE)
[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]
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-32\\InstallPath]
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-64\\InstallPath]
)
endforeach()
endif()