build: opencv: disable opencv deps if it's not installed

When hotdoc documentation is enabled and opencv plugin is set as
auto-detected, but the library isn't installed, meson configuration fails
with this message:

  ../subprojects/gst-plugins-bad/docs/meson.build:139:21: ERROR: Unknown variable "gstopencv_dep".

This patch fixes this case defined gstopencv_dep as disabler() when
dependencies aren't found.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5560>
This commit is contained in:
Víctor Manuel Jáquez Leal 2023-10-26 16:32:28 +02:00 committed by GStreamer Marge Bot
parent 38e8896887
commit ce91004c3b

View file

@ -97,4 +97,6 @@ if opencv_found
install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv')
elif get_option('opencv').enabled()
error('OpenCV support enabled but required dependencies were not found.')
else
gstopencv_dep = disabler()
endif