cmake: workaround for dependencies resolver (bypass non-module deps w/o check)

This commit is contained in:
Alexander Alekhin 2013-10-03 02:20:54 +04:00
parent 7a53910495
commit 034a77c26d

View File

@ -312,11 +312,16 @@ function(__ocv_resolve_dependencies)
set(__deps ${OPENCV_MODULE_${m}_REQ_DEPS} ${OPENCV_MODULE_${m}_PRIVATE_REQ_DEPS}) set(__deps ${OPENCV_MODULE_${m}_REQ_DEPS} ${OPENCV_MODULE_${m}_PRIVATE_REQ_DEPS})
while(__deps) while(__deps)
ocv_list_pop_front(__deps d) ocv_list_pop_front(__deps d)
if(NOT (HAVE_${d} OR TARGET ${d} OR EXISTS ${d})) string(TOLOWER "${d}" upper_d)
# message(STATUS "Module ${m} disabled because ${d} dependency can't be resolved!") if(NOT (HAVE_${d} OR HAVE_${upper_d} OR TARGET ${d} OR EXISTS ${d}))
__ocv_module_turn_off(${m}) if(d MATCHES "^opencv_") # TODO Remove this condition in the future and use HAVE_ variables only
set(has_changes ON) message(STATUS "Module ${m} disabled because ${d} dependency can't be resolved!")
break() __ocv_module_turn_off(${m})
set(has_changes ON)
break()
else()
message(STATUS "Assume that non-module dependency is available: ${d} (for module ${m})")
endif()
endif() endif()
endwhile() endwhile()
endforeach() endforeach()