deepin-ocr/3rdparty/opencv-4.5.4/modules/python/CMakeLists.txt
wangzhengyang 718c41634f feat: 切换后端至PaddleOCR-NCNN,切换工程为CMake
1.项目后端整体迁移至PaddleOCR-NCNN算法,已通过基本的兼容性测试
2.工程改为使用CMake组织,后续为了更好地兼容第三方库,不再提供QMake工程
3.重整权利声明文件,重整代码工程,确保最小化侵权风险

Log: 切换后端至PaddleOCR-NCNN,切换工程为CMake
Change-Id: I4d5d2c5d37505a4a24b389b1a4c5d12f17bfa38c
2022-05-10 10:22:11 +08:00

48 lines
1.2 KiB
CMake

# ----------------------------------------------------------------------------
# CMake file for python support
# ----------------------------------------------------------------------------
if(DEFINED OPENCV_INITIAL_PASS) # OpenCV build
if(ANDROID OR APPLE_FRAMEWORK OR WINRT)
ocv_module_disable_(python2)
ocv_module_disable_(python3)
return()
elseif(BUILD_opencv_world OR (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug"))
if(NOT DEFINED BUILD_opencv_python2)
set(__disable_python2 ON)
endif()
if(NOT DEFINED BUILD_opencv_python3)
set(__disable_python3 ON)
endif()
endif()
add_subdirectory(bindings)
add_subdirectory(test)
if(NOT OPENCV_SKIP_PYTHON_LOADER)
include("./python_loader.cmake")
message(STATUS "OpenCV Python: during development append to PYTHONPATH: ${CMAKE_BINARY_DIR}/python_loader")
endif()
if(__disable_python2)
ocv_module_disable_(python2)
endif()
if(__disable_python3)
ocv_module_disable_(python3)
endif()
if(__disable_python2 AND __disable_python3)
return()
endif()
add_subdirectory(python2)
add_subdirectory(python3)
else() # standalone build
cmake_minimum_required(VERSION 2.8.12)
project(OpenCVPython CXX C)
include("./standalone.cmake")
endif()