Commit 7afce8e0 authored by Alexander Alekhin's avatar Alexander Alekhin

world build: fix modules instantiation order

opencv_hal before opencv_world
opencv_world before opencv_ts
parent 1836d41b
......@@ -305,9 +305,10 @@ macro(ocv_glob_modules)
set(OPENCV_INITIAL_PASS OFF PARENT_SCOPE)
set(OPENCV_INITIAL_PASS OFF)
if(${BUILD_opencv_world})
add_subdirectory("${OPENCV_MODULE_opencv_world_LOCATION}" "${CMAKE_CURRENT_BINARY_DIR}/world")
foreach(m ${OPENCV_MODULES_BUILD})
if(NOT OPENCV_MODULE_${m}_IS_PART_OF_WORLD AND NOT ${m} STREQUAL opencv_world)
if("${m}" STREQUAL opencv_world)
add_subdirectory("${OPENCV_MODULE_opencv_world_LOCATION}" "${CMAKE_CURRENT_BINARY_DIR}/world")
elseif(NOT OPENCV_MODULE_${m}_IS_PART_OF_WORLD AND NOT ${m} STREQUAL opencv_world)
message(STATUS "Processing module ${m}...")
if(m MATCHES "^opencv_")
string(REGEX REPLACE "^opencv_" "" __shortname "${m}")
......@@ -446,6 +447,17 @@ function(__ocv_resolve_dependencies)
list(APPEND deps_${m} ${d})
set(has_changes ON)
endif()
if(BUILD_opencv_world
AND NOT "${m}" STREQUAL "opencv_world"
AND NOT "${m2}" STREQUAL "opencv_world"
AND OPENCV_MODULE_${m2}_IS_PART_OF_WORLD
AND NOT OPENCV_MODULE_${m}_IS_PART_OF_WORLD)
if(NOT (";${deps_${m}};" MATCHES ";opencv_world;"))
# message(STATUS " Transfer dependency opencv_world alias ${m2} to ${m}")
list(APPEND deps_${m} opencv_world)
set(has_changes ON)
endif()
endif()
endforeach()
endif()
endforeach()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment