summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Palfinger <werner.palfinger@gmail.com>2018-01-19 11:13:03 (GMT)
committerWerner Palfinger <werner.palfinger@gmail.com>2018-01-19 11:13:03 (GMT)
commita7d344be712cddd906f066809896c208ae99702c (patch)
tree3c41da94e3b4616e1f317756c46d8593ab3c1bcd
parentbe2f0509037880a94f487867bee088a231054f4b (diff)
downloadCMake-a7d344be712cddd906f066809896c208ae99702c.zip
CMake-a7d344be712cddd906f066809896c208ae99702c.tar.gz
CMake-a7d344be712cddd906f066809896c208ae99702c.tar.bz2
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
-rw-r--r--Modules/FindPythonInterp.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 64b98a8..3ef8e9f 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()