cmake: fix processing order of <wrapper>_bindings_generator
- ensure that wrapped modules are already processed
This commit is contained in:
parent
e309ad8465
commit
b31ce408ae
@ -98,15 +98,6 @@ macro(ocv_add_dependencies full_modname)
|
|||||||
endforeach()
|
endforeach()
|
||||||
unset(__depsvar)
|
unset(__depsvar)
|
||||||
|
|
||||||
# hack for python
|
|
||||||
set(__python_idx)
|
|
||||||
list(FIND OPENCV_MODULE_${full_modname}_WRAPPERS "python" __python_idx)
|
|
||||||
if (NOT __python_idx EQUAL -1)
|
|
||||||
list(REMOVE_ITEM OPENCV_MODULE_${full_modname}_WRAPPERS "python")
|
|
||||||
list(APPEND OPENCV_MODULE_${full_modname}_WRAPPERS "python_bindings_generator" "python2" "python3")
|
|
||||||
endif()
|
|
||||||
unset(__python_idx)
|
|
||||||
|
|
||||||
ocv_list_unique(OPENCV_MODULE_${full_modname}_REQ_DEPS)
|
ocv_list_unique(OPENCV_MODULE_${full_modname}_REQ_DEPS)
|
||||||
ocv_list_unique(OPENCV_MODULE_${full_modname}_OPT_DEPS)
|
ocv_list_unique(OPENCV_MODULE_${full_modname}_OPT_DEPS)
|
||||||
ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_REQ_DEPS)
|
ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_REQ_DEPS)
|
||||||
@ -209,9 +200,17 @@ macro(ocv_add_module _name)
|
|||||||
set(OPENCV_MODULES_DISABLED_USER ${OPENCV_MODULES_DISABLED_USER} "${the_module}" CACHE INTERNAL "List of OpenCV modules explicitly disabled by user")
|
set(OPENCV_MODULES_DISABLED_USER ${OPENCV_MODULES_DISABLED_USER} "${the_module}" CACHE INTERNAL "List of OpenCV modules explicitly disabled by user")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add reverse wrapper dependencies
|
# add reverse wrapper dependencies (BINDINDS)
|
||||||
foreach (wrapper ${OPENCV_MODULE_${the_module}_WRAPPERS})
|
foreach (wrapper ${OPENCV_MODULE_${the_module}_WRAPPERS})
|
||||||
ocv_add_dependencies(opencv_${wrapper} OPTIONAL ${the_module})
|
if(wrapper STREQUAL "python") # hack for python (BINDINDS)
|
||||||
|
ocv_add_dependencies(opencv_python2 OPTIONAL ${the_module})
|
||||||
|
ocv_add_dependencies(opencv_python3 OPTIONAL ${the_module})
|
||||||
|
else()
|
||||||
|
ocv_add_dependencies(opencv_${wrapper} OPTIONAL ${the_module})
|
||||||
|
endif()
|
||||||
|
if(DEFINED OPENCV_MODULE_opencv_${wrapper}_bindings_generator_CLASS)
|
||||||
|
ocv_add_dependencies(opencv_${wrapper}_bindings_generator OPTIONAL ${the_module})
|
||||||
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# stop processing of current file
|
# stop processing of current file
|
||||||
|
|||||||
@ -11,7 +11,7 @@ set(PYTHON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../")
|
|||||||
# get list of modules to wrap
|
# get list of modules to wrap
|
||||||
set(OPENCV_PYTHON_MODULES)
|
set(OPENCV_PYTHON_MODULES)
|
||||||
foreach(m ${OPENCV_MODULES_BUILD})
|
foreach(m ${OPENCV_MODULES_BUILD})
|
||||||
if (";${OPENCV_MODULE_${m}_WRAPPERS};" MATCHES ";${MODULE_NAME};" AND HAVE_${m})
|
if (";${OPENCV_MODULE_${m}_WRAPPERS};" MATCHES ";python;" AND HAVE_${m})
|
||||||
list(APPEND OPENCV_PYTHON_MODULES ${m})
|
list(APPEND OPENCV_PYTHON_MODULES ${m})
|
||||||
#message(STATUS "\t${m}")
|
#message(STATUS "\t${m}")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user