Commit 443b3157 authored by yanlend's avatar yanlend

Fix win32 search for same bitness executable

find_package(PythonInterp) calls find_program(PYTHON_EXECUTABLE), i.e. without version number. For the Win32-search before to be effective, the same variable has to be used.
parent c094c58b
...@@ -37,7 +37,7 @@ function(find_python preferred_version min_version library_env include_dir_env ...@@ -37,7 +37,7 @@ function(find_python preferred_version min_version library_env include_dir_env
# standard FindPythonInterp always prefers executable from system path # standard FindPythonInterp always prefers executable from system path
# this is really important because we are using the interpreter for numpy search and for choosing the install location # this is really important because we are using the interpreter for numpy search and for choosing the install location
foreach(_CURRENT_VERSION ${Python_ADDITIONAL_VERSIONS} "${preferred_version}" "${min_version}") foreach(_CURRENT_VERSION ${Python_ADDITIONAL_VERSIONS} "${preferred_version}" "${min_version}")
find_host_program(executable find_host_program(PYTHON_EXECUTABLE
NAMES python${_CURRENT_VERSION} python NAMES python${_CURRENT_VERSION} python
PATHS PATHS
[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\${_CURRENT_VERSION}\\\\InstallPath] [HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\${_CURRENT_VERSION}\\\\InstallPath]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment