|
|
|
@ -1,28 +1,7 @@ |
|
|
|
|
# This file is included from a subdirectory |
|
|
|
|
set(PYTHON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../") |
|
|
|
|
|
|
|
|
|
set(candidate_deps "") |
|
|
|
|
foreach(mp ${OPENCV_MODULES_PATH} ${OPENCV_EXTRA_MODULES_PATH}) |
|
|
|
|
file(GLOB names "${mp}/*") |
|
|
|
|
foreach(m IN LISTS names) |
|
|
|
|
if(IS_DIRECTORY ${m}) |
|
|
|
|
get_filename_component(m ${m} NAME) |
|
|
|
|
list(APPEND candidate_deps "opencv_${m}") |
|
|
|
|
endif() |
|
|
|
|
endforeach(m) |
|
|
|
|
endforeach(mp) |
|
|
|
|
|
|
|
|
|
# module blacklist |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_cud(a|ev)") |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_matlab$") |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_ts$") |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_adas$") |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_tracking$") |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_bioinspired$") |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_java$") |
|
|
|
|
ocv_list_filterout(candidate_deps "^opencv_contrib_world$") |
|
|
|
|
|
|
|
|
|
ocv_add_module(${MODULE_NAME} BINDINGS OPTIONAL ${candidate_deps}) |
|
|
|
|
ocv_add_module(${MODULE_NAME} BINDINGS) |
|
|
|
|
|
|
|
|
|
ocv_module_include_directories( |
|
|
|
|
"${PYTHON_INCLUDE_PATH}" |
|
|
|
@ -30,16 +9,25 @@ ocv_module_include_directories( |
|
|
|
|
"${PYTHON_SOURCE_DIR}/src2" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
# get list of modules to wrap |
|
|
|
|
# message(STATUS "Wrapped in ${MODULE_NAME}:") |
|
|
|
|
set(OPENCV_PYTHON_MODULES) |
|
|
|
|
foreach(m ${OPENCV_MODULES_BUILD}) |
|
|
|
|
if (";${OPENCV_MODULE_${m}_WRAPPERS};" MATCHES ";${MODULE_NAME};" AND HAVE_${m}) |
|
|
|
|
list(APPEND OPENCV_PYTHON_MODULES ${m}) |
|
|
|
|
# message(STATUS "\t${m}") |
|
|
|
|
endif() |
|
|
|
|
endforeach() |
|
|
|
|
|
|
|
|
|
set(opencv_hdrs "") |
|
|
|
|
foreach(m IN LISTS OPENCV_MODULE_opencv_${MODULE_NAME}_DEPS) |
|
|
|
|
list(APPEND opencv_hdrs ${OPENCV_MODULE_${m}_HEADERS}) |
|
|
|
|
foreach(m ${OPENCV_PYTHON_MODULES}) |
|
|
|
|
list(APPEND opencv_hdrs ${OPENCV_MODULE_${m}_HEADERS}) |
|
|
|
|
endforeach(m) |
|
|
|
|
|
|
|
|
|
# header blacklist |
|
|
|
|
ocv_list_filterout(opencv_hdrs ".h$") |
|
|
|
|
ocv_list_filterout(opencv_hdrs "cuda") |
|
|
|
|
ocv_list_filterout(opencv_hdrs "cudev") |
|
|
|
|
ocv_list_filterout(opencv_hdrs "opencv2/objdetect/detection_based_tracker.hpp") |
|
|
|
|
|
|
|
|
|
set(cv2_generated_hdrs |
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/pyopencv_generated_include.h" |
|
|
|
|