message: error if cuda4dnn depends are not resolved
diff: @@ -27,8 +27,18 @@ ocv_option(OPENCV_DNN_CUDA "Build with CUDA support"
  AND HAVE_CUDNN
  )
  -if(OPENCV_DNN_CUDA AND HAVE_CUDA AND HAVE_CUBLAS AND HAVE_CUDNN)
  +if(OPENCV_DNN_CUDA)
  + if(HAVE_CUDA AND HAVE_CUBLAS AND HAVE_CUDNN)
  add_definitions(-DCV_CUDA4DNN=1)
  + else()
  + if(NOT HAVE_CUDA)
  + message(SEND_ERROR "DNN: CUDA backend requires CUDA Toolkit. Please resolve dependency or disable OPENCV_DNN_CUDA=OFF")
  + elseif(NOT HAVE_CUBLAS)
  + message(SEND_ERROR "DNN: CUDA backend requires cuBLAS. Please resolve dependency or disable OPENCV_DNN_CUDA=OFF")
  + elseif(NOT HAVE_CUDNN)
  + message(SEND_ERROR "DNN: CUDA backend requires cuDNN. Please resolve dependency or disable OPENCV_DNN_CUDA=OFF")
  + endif()
  + endif()
  endif()
  ocv_cmake_hook_append(INIT_MODULE_SOURCES_opencv_dnn "${CMAKE_CURRENT_LIST_DIR}/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake")
  