From 643bbb2d93a23390736942566fa1c01993927cdc Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Fri, 6 Mar 2015 16:57:38 +0300 Subject: [PATCH] looks like Maksim was right; the new fix does not do the second attempt to detect python libs, it finds it correctly with the first attempt --- cmake/OpenCVDetectPython.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake index 754c2f138..8ed425fb5 100644 --- a/cmake/OpenCVDetectPython.cmake +++ b/cmake/OpenCVDetectPython.cmake @@ -75,10 +75,10 @@ function(find_python preferred_version min_version library_env include_dir_env if(NOT ANDROID AND NOT IOS) ocv_check_environment_variables(${library_env} ${include_dir_env}) - if(${library_env}) + if(${${library_env}}) set(PYTHON_LIBRARY "${${library_env}}") endif() - if(${include_dir_env}) + if(${${include_dir_env}}) set(PYTHON_INCLUDE_DIR "${${include_dir_env}}") endif() @@ -88,9 +88,6 @@ function(find_python preferred_version min_version library_env include_dir_env find_host_package(PythonLibs "${_version_major_minor}") else() find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT) - if(NOT PYTHONLIBS_FOUND) - find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}") - endif() endif() if(PYTHONLIBS_FOUND)