From a7d344be712cddd906f066809896c208ae99702c Mon Sep 17 00:00:00 2001 From: Werner Palfinger Date: Fri, 19 Jan 2018 06:13:03 -0500 Subject: 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 --- Modules/FindPythonInterp.cmake | 3 +++ 1 file changed, 3 insertions(+) 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() -- cgit v0.12