Merge pull request #19059 from alalek:fixup_19000

This commit is contained in:
Alexander Alekhin 2020-12-09 18:01:03 +00:00
commit 37bfb3c48d

View File

@ -200,19 +200,6 @@ 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")
endif()
# add reverse wrapper dependencies (BINDINDS)
foreach (wrapper ${OPENCV_MODULE_${the_module}_WRAPPERS})
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()
# stop processing of current file
ocv_cmake_hook(POST_ADD_MODULE)
ocv_cmake_hook(POST_ADD_MODULE_${the_module})
@ -499,6 +486,21 @@ function(__ocv_resolve_dependencies)
endforeach()
endif()
# add reverse wrapper dependencies (BINDINDS)
foreach(the_module ${OPENCV_MODULES_BUILD})
foreach (wrapper ${OPENCV_MODULE_${the_module}_WRAPPERS})
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()
# disable MODULES with unresolved dependencies
set(has_changes ON)
while(has_changes)