From 443b3157e0784e1a7fe800e5af4dd63f1290f7cd Mon Sep 17 00:00:00 2001 From: yanlend Date: Fri, 10 Apr 2015 14:57:31 +0200 Subject: [PATCH] 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. --- cmake/OpenCVDetectPython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake index ed7569821..f883525c8 100644 --- a/cmake/OpenCVDetectPython.cmake +++ b/cmake/OpenCVDetectPython.cmake @@ -37,7 +37,7 @@ function(find_python preferred_version min_version library_env include_dir_env # 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 foreach(_CURRENT_VERSION ${Python_ADDITIONAL_VERSIONS} "${preferred_version}" "${min_version}") - find_host_program(executable + find_host_program(PYTHON_EXECUTABLE NAMES python${_CURRENT_VERSION} python PATHS [HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\${_CURRENT_VERSION}\\\\InstallPath]