Enable cudacodec libs by default, prevent their locations being lost when cmake is re-run and add log info when the libs/headers cannot be found.

This commit is contained in:
cudawarped 2022-11-29 08:25:26 +02:00
parent ac6fb17784
commit b1288dad40
2 changed files with 6 additions and 2 deletions

View File

@ -263,10 +263,10 @@ OCV_OPTION(WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BL
OCV_OPTION(WITH_CUDNN "Include NVIDIA CUDA Deep Neural Network (cuDNN) library support" WITH_CUDA
VISIBLE_IF WITH_CUDA
VERIFY HAVE_CUDNN)
OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" OFF # disabled, details: https://github.com/opencv/opencv/issues/14850
OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" ON
VISIBLE_IF WITH_CUDA
VERIFY HAVE_NVCUVID)
OCV_OPTION(WITH_NVCUVENC "Include NVidia Video Encoding library support" OFF
OCV_OPTION(WITH_NVCUVENC "Include NVidia Video Encoding library support" ON
VISIBLE_IF WITH_CUDA
VERIFY HAVE_NVCUVENC)
OCV_OPTION(WITH_EIGEN "Include Eigen2/Eigen3 support" (NOT CV_DISABLE_OPTIMIZATION AND NOT CMAKE_CROSSCOMPILING)

View File

@ -10,6 +10,10 @@ endif()
#set(OPENCV_CMAKE_CUDA_DEBUG 1)
if(CUDA_TOOLKIT_ROOT_DIR)
set(CUDA_TOOLKIT_TARGET_DIR ${CUDA_TOOLKIT_ROOT_DIR})
endif()
if(((NOT CMAKE_VERSION VERSION_LESS "3.9.0") # requires https://gitlab.kitware.com/cmake/cmake/merge_requests/663
OR OPENCV_CUDA_FORCE_EXTERNAL_CMAKE_MODULE)
AND NOT OPENCV_CUDA_FORCE_BUILTIN_CMAKE_MODULE)