mirror of
https://github.com/opencv/opencv.git
synced 2024-12-02 07:39:57 +08:00
da4ac6b7ef
Introduce libavdevice to make v4l2 available to the ffmpeg backend * introduce libavdevice to make v4l2 available to the ffmpeg backend * downgrade the min required libavdevice version to 53.2.0 * make libavdevice optional * create OCV_OPTION OPENCV_FFMPEG_ENABLE_LIBAVDEVICE and add definition through ocv_add_external_target * move OCV_OPTION 'OPENCV_FFMPEG_ENABLE_LIBAVDEVICE' to detect_ffmpeg.cmake
22 lines
985 B
CMake
22 lines
985 B
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE)
|
|
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVPluginStandalone.cmake")
|
|
|
|
# scan dependencies
|
|
set(WITH_FFMPEG ON)
|
|
set(OPENCV_FFMPEG_SKIP_BUILD_CHECK ON)
|
|
include("${OpenCV_SOURCE_DIR}/modules/videoio/cmake/init.cmake")
|
|
|
|
set(OPENCV_PLUGIN_DEPS core imgproc imgcodecs)
|
|
ocv_create_plugin(videoio "opencv_videoio_ffmpeg" "ocv.3rdparty.ffmpeg" "FFmpeg" "src/cap_ffmpeg.cpp")
|
|
|
|
message(STATUS "FFMPEG_libavcodec_VERSION=${FFMPEG_libavcodec_VERSION}")
|
|
message(STATUS "FFMPEG_libavformat_VERSION=${FFMPEG_libavformat_VERSION}")
|
|
message(STATUS "FFMPEG_libavutil_VERSION=${FFMPEG_libavutil_VERSION}")
|
|
message(STATUS "FFMPEG_libswscale_VERSION=${FFMPEG_libswscale_VERSION}")
|
|
message(STATUS "FFMPEG_libavresample_VERSION=${FFMPEG_libavresample_VERSION}")
|
|
if(OPENCV_FFMPEG_ENABLE_LIBAVDEVICE)
|
|
message(STATUS "FFMPEG_libavdevice_VERSION=${FFMPEG_libavdevice_VERSION}")
|
|
endif()
|