Made dependency of features2d and calib3d from highgui optional

This commit is contained in:
Andrey Kamaev
2012-03-13 12:33:16 +00:00
parent d68311b9eb
commit e4307d05f3
8 changed files with 46 additions and 9 deletions

View File

@@ -277,7 +277,12 @@ macro(ocv_glob_modules)
if(__ocvmodules)
list(SORT __ocvmodules)
foreach(mod ${__ocvmodules})
if(EXISTS "${__path}/${mod}/CMakeLists.txt")
if(CMAKE_VERSION VERSION_LESS 2.8)
get_filename_component(__realpath "${__path}/${mod}" ABSOLUTE)
else()
get_filename_component(__realpath "${__path}/${mod}" REALPATH)
endif()
if(EXISTS "${__realpath}/CMakeLists.txt" AND NOT __realpath STREQUAL CMAKE_CURRENT_SOURCE_DIR)
add_subdirectory("${__path}/${mod}" "${CMAKE_CURRENT_BINARY_DIR}/${mod}/.${mod}")
endif()
endforeach()