Merge pull request #21218 from alalek:cmake_gapi_gstreamer_option

This commit is contained in:
Alexander Alekhin 2021-12-08 12:36:10 +00:00
commit 9bcb006ec7

View File

@ -300,7 +300,8 @@ if(HAVE_GAPI_ONEVPL)
endif()
endif()
if(HAVE_GSTREAMER)
ocv_option(OPENCV_GAPI_GSTREAMER "Build G-API with GStreamer support" HAVE_GSTREAMER)
if(HAVE_GSTREAMER AND OPENCV_GAPI_GSTREAMER)
if(TARGET opencv_test_gapi)
ocv_target_compile_definitions(opencv_test_gapi PRIVATE -DHAVE_GSTREAMER)
ocv_target_link_libraries(opencv_test_gapi PRIVATE ocv.3rdparty.gstreamer)