|
| 1 | +diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake |
| 2 | +index 31c2c1e..c890917 100644 |
| 3 | +--- a/cmake/OpenCVDetectPython.cmake |
| 4 | ++++ b/cmake/OpenCVDetectPython.cmake |
| 5 | +@@ -36,7 +36,7 @@ if(PYTHON_EXECUTABLE) |
| 6 | + unset(PYTHON_VERSION_FULL) |
| 7 | + endif() |
| 8 | + |
| 9 | +- if(NOT ANDROID AND NOT IOS) |
| 10 | ++ if(P4A OR NOT ANDROID AND NOT IOS) |
| 11 | + ocv_check_environment_variables(PYTHON_LIBRARY PYTHON_INCLUDE_DIR) |
| 12 | + if(CMAKE_CROSSCOMPILING) |
| 13 | + find_host_package(PythonLibs ${PYTHON_VERSION_MAJOR_MINOR}) |
| 14 | +@@ -51,7 +51,7 @@ if(PYTHON_EXECUTABLE) |
| 15 | + endif() |
| 16 | + endif() |
| 17 | + |
| 18 | +- if(NOT ANDROID AND NOT IOS) |
| 19 | ++ if(P4A OR NOT ANDROID AND NOT IOS) |
| 20 | + if(CMAKE_HOST_UNIX) |
| 21 | + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_python_lib()" |
| 22 | + RESULT_VARIABLE PYTHON_CVPY_PROCESS |
| 23 | +@@ -117,7 +117,7 @@ if(PYTHON_EXECUTABLE) |
| 24 | + OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 25 | + endif() |
| 26 | + endif() |
| 27 | +- endif(NOT ANDROID AND NOT IOS) |
| 28 | ++ endif(P4A OR NOT ANDROID AND NOT IOS) |
| 29 | + |
| 30 | + if(BUILD_DOCS) |
| 31 | + find_host_program(SPHINX_BUILD sphinx-build) |
| 32 | +diff --git a/modules/python/CMakeLists.txt b/modules/python/CMakeLists.txt |
| 33 | +index 3c0f2fd..7ba234a 100644 |
| 34 | +--- a/modules/python/CMakeLists.txt |
| 35 | ++++ b/modules/python/CMakeLists.txt |
| 36 | +@@ -5,7 +5,7 @@ |
| 37 | + if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") |
| 38 | + ocv_module_disable(python) |
| 39 | + endif() |
| 40 | +-if(ANDROID OR IOS OR NOT PYTHONLIBS_FOUND OR NOT PYTHON_USE_NUMPY) |
| 41 | ++if(ANDROID AND NOT P4A OR IOS OR NOT PYTHONLIBS_FOUND OR NOT PYTHON_USE_NUMPY) |
| 42 | + ocv_module_disable(python) |
| 43 | + endif() |
| 44 | + |
0 commit comments