fix python cross-compilation

pull/4211/head
Alexander Alekhin 10 years ago
parent 67158b12cd
commit 0906744788
  1. 6
      cmake/OpenCVDetectPython.cmake

@ -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)

Loading…
Cancel
Save