diff --git a/modules/videoio/CMakeLists.txt b/modules/videoio/CMakeLists.txt index 4659f750e6..721628325f 100644 --- a/modules/videoio/CMakeLists.txt +++ b/modules/videoio/CMakeLists.txt @@ -1,4 +1,4 @@ -set(VIDEOIO_PLUGIN_LIST "" CACHE STRING "List of videoio backends to be compiled as plugins (ffmpeg, gstreamer)") +set(VIDEOIO_PLUGIN_LIST "" CACHE STRING "List of videoio backends to be compiled as plugins (ffmpeg, gstreamer, mfx, msmf or special value 'all')") set(VIDEOIO_ENABLE_PLUGINS "ON" CACHE BOOL "Allow building videoio plugin support") set(VIDEOIO_ENABLE_STRICT_PLUGIN_CHECK "ON" CACHE BOOL "Make sure OpenCV version is the same in plugin and host code") mark_as_advanced(VIDEOIO_PLUGIN_LIST VIDEOIO_ENABLE_PLUGINS VIDEOIO_ENABLE_STRICT_PLUGIN_CHECK) @@ -69,7 +69,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/plugin.cmake) set(tgts) if(TARGET ocv.3rdparty.mediasdk) - if("mfx" IN_LIST VIDEOIO_PLUGIN_LIST) + if("mfx" IN_LIST VIDEOIO_PLUGIN_LIST OR VIDEOIO_PLUGIN_LIST STREQUAL "all") ocv_create_builtin_videoio_plugin("opencv_videoio_intel_mfx" ocv.3rdparty.mediasdk "cap_mfx_common.cpp" "cap_mfx_reader.cpp" "cap_mfx_writer.cpp" "cap_mfx_plugin.cpp") else() list(APPEND videoio_srcs @@ -91,7 +91,7 @@ if(TARGET ocv.3rdparty.dshow) endif() if(TARGET ocv.3rdparty.msmf) - if("msmf" IN_LIST VIDEOIO_PLUGIN_LIST) + if("msmf" IN_LIST VIDEOIO_PLUGIN_LIST OR VIDEOIO_PLUGIN_LIST STREQUAL "all") ocv_create_builtin_videoio_plugin("opencv_videoio_msmf" ocv.3rdparty.msmf "cap_msmf.cpp") else() list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_msmf.hpp) @@ -111,7 +111,7 @@ if(TARGET ocv.3rdparty.dc1394_2) endif() if(TARGET ocv.3rdparty.gstreamer) - if("gstreamer" IN_LIST VIDEOIO_PLUGIN_LIST) + if("gstreamer" IN_LIST VIDEOIO_PLUGIN_LIST OR VIDEOIO_PLUGIN_LIST STREQUAL "all") ocv_create_builtin_videoio_plugin("opencv_videoio_gstreamer" ocv.3rdparty.gstreamer "cap_gstreamer.cpp") else() list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_gstreamer.cpp) @@ -137,7 +137,7 @@ endif() if(TARGET ocv.3rdparty.ffmpeg) if(HAVE_FFMPEG_WRAPPER) list(APPEND tgts ocv.3rdparty.ffmpeg) - elseif("ffmpeg" IN_LIST VIDEOIO_PLUGIN_LIST) + elseif("ffmpeg" IN_LIST VIDEOIO_PLUGIN_LIST OR VIDEOIO_PLUGIN_LIST STREQUAL "all") ocv_create_builtin_videoio_plugin("opencv_videoio_ffmpeg" ocv.3rdparty.ffmpeg "cap_ffmpeg.cpp") else() list(APPEND videoio_hdrs ${CMAKE_CURRENT_LIST_DIR}/src/cap_ffmpeg_impl.hpp)