CMakeLists.txt 703 B

1234567891011121314151617181920212223242526272829
  1. if(IOS OR APPLE OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
  2. ocv_module_disable(cudacodec)
  3. endif()
  4. set(the_description "CUDA-accelerated Video Encoding/Decoding")
  5. ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wshadow)
  6. ocv_add_module(cudacodec opencv_core opencv_videoio OPTIONAL opencv_cudev WRAP python)
  7. ocv_module_include_directories()
  8. ocv_glob_module_sources()
  9. set(extra_libs "")
  10. if(HAVE_NVCUVID)
  11. list(APPEND extra_libs ${CUDA_CUDA_LIBRARY} ${CUDA_nvcuvid_LIBRARY})
  12. endif()
  13. if(HAVE_NVCUVENC)
  14. if(WIN32)
  15. list(APPEND extra_libs ${CUDA_nvcuvenc_LIBRARY})
  16. endif()
  17. endif()
  18. ocv_create_module(${extra_libs})
  19. ocv_add_accuracy_tests()
  20. ocv_add_perf_tests()