Merge pull request #4211 from alalek:fix_python_2_4

This commit is contained in:
Maksim Shabunin 2015-07-24 13:33:51 +00:00
commit 9eda260495

View File

@ -39,11 +39,11 @@ if(PYTHON_EXECUTABLE)
if(NOT ANDROID AND NOT IOS)
ocv_check_environment_variables(PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
if(CMAKE_CROSSCOMPILING)
find_host_package(PythonLibs ${PYTHON_VERSION_MAJOR_MINOR})
find_package(PythonLibs ${PYTHON_VERSION_MAJOR_MINOR})
elseif(CMAKE_VERSION VERSION_GREATER 2.8.8 AND PYTHON_VERSION_FULL)
find_host_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT)
find_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT)
else()
find_host_package(PythonLibs ${PYTHON_VERSION_FULL})
find_package(PythonLibs ${PYTHON_VERSION_FULL})
endif()
# cmake 2.4 (at least on Ubuntu 8.04 (hardy)) don't define PYTHONLIBS_FOUND
if(NOT PYTHONLIBS_FOUND AND PYTHON_INCLUDE_PATH)