Attempt to fix #1580 - building OpenCV with ffmpeg not in LD_LIBRARY_PATH

This commit is contained in:
Andrey Kamaev 2012-02-03 18:52:00 +00:00
parent 1e79280be1
commit fdc1e87ddf

View File

@ -285,12 +285,21 @@ macro(ocv_glob_modules)
#resolve dependencies #resolve dependencies
__ocv_flatten_module_dependencies() __ocv_flatten_module_dependencies()
#order modules by dependencies
set(OPENCV_MODULES_BUILD_ "")
foreach(m ${OPENCV_MODULES_BUILD})
list(APPEND OPENCV_MODULES_BUILD_ ${OPENCV_MODULE_${m}_DEPS} ${m})
endforeach()
ocv_list_unique(OPENCV_MODULES_BUILD_)
#create modules #create modules
set(OPENCV_INITIAL_PASS OFF) set(OPENCV_INITIAL_PASS OFF)
foreach(m ${OPENCV_MODULES_BUILD}) foreach(m ${OPENCV_MODULES_BUILD_})
string(REGEX REPLACE "^opencv_" "" __shortname "${m}") if(m MATCHES "^opencv_")
add_subdirectory("${OPENCV_MODULE_${m}_LOCATION}" "${CMAKE_CURRENT_BINARY_DIR}/${__shortname}") string(REGEX REPLACE "^opencv_" "" __shortname "${m}")
add_subdirectory("${OPENCV_MODULE_${m}_LOCATION}" "${CMAKE_CURRENT_BINARY_DIR}/${__shortname}")
endif()
endforeach() endforeach()
unset(__shortname) unset(__shortname)
endmacro() endmacro()