python: bindings loader package

Configures and loads OpenCV bindings extension including 3rdparty dependencies

Based on running Python specify:
- configure PYTHON_PATH (via "sys.path")
- configure LD_LIBRARY_PATH / PATH
This commit is contained in:
Alexander Alekhin
2018-10-28 13:32:27 +00:00
parent e5afa62c3d
commit ce6acd3ecd
13 changed files with 301 additions and 27 deletions
+9 -4
View File
@@ -3,11 +3,10 @@
# ----------------------------------------------------------------------------
if(DEFINED OPENCV_INITIAL_PASS) # OpenCV build
add_subdirectory(bindings)
if(ANDROID OR APPLE_FRAMEWORK OR WINRT)
set(__disable_python2 ON)
set(__disable_python3 ON)
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)
@@ -17,6 +16,12 @@ elseif(BUILD_opencv_world OR (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug"))
endif()
endif()
add_subdirectory(bindings)
if(NOT OPENCV_SKIP_PYTHON_LOADER)
include("./python_loader.cmake")
endif()
if(__disable_python2)
ocv_module_disable_(python2)
endif()