if(WITH_CERES)
  if(BUILD_CERES)
    v4r_clear_vars(CERES_FOUND)
  endif()
  if(NOT CERES_FOUND)
    v4r_clear_vars(CERES_LIBRARY CERES_INCLUDE_DIRS CERES_VERSION)
    set(CERES_LIBRARY ceres)
    set(CERES_LIBRARIES ${CERES_LIBRARY})
    add_subdirectory("${V4R_SOURCE_DIR}/3rdparty/ceres")
    set(CERES_INCLUDE_DIRS "${${CERES_LIBRARY}_INCLUDE_DIR}")
    set(CERES_VERSION "${${CERES_LIBRARY}_VERSION}") 
  endif()
  set(HAVE_CERES YES)
endif()
