set(the_description "RGBD algorithms")

find_package(Ceres QUIET)
ocv_define_module(rgbd opencv_core opencv_calib3d opencv_imgproc OPTIONAL opencv_viz WRAP python)

if(Ceres_FOUND)
  ocv_target_compile_definitions(${the_module} PUBLIC CERES_FOUND)
  ocv_target_link_libraries(${the_module} ${CERES_LIBRARIES})
  if(Ceres_VERSION VERSION_LESS 2.0.0)
    ocv_include_directories("${CERES_INCLUDE_DIRS}")
  endif()
  add_definitions(/DGLOG_NO_ABBREVIATED_SEVERITIES)  # avoid ERROR macro conflict in glog (ceres dependency)
else()
  message(STATUS "rgbd: CERES support is disabled. Ceres Solver is Required for Posegraph optimization")
endif()
