meson: va: Add va option check into plugin's build.
authorHe Junyan <junyan.he@intel.com>
Sun, 13 Feb 2022 02:49:31 +0000 (10:49 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 14 Feb 2022 06:30:56 +0000 (06:30 +0000)
Because the liblibgstva is built unconditionally, we now move the
va option check into va plugin's build.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1685>

subprojects/gst-plugins-bad/sys/va/meson.build

index fae5d68..e240dfa 100644 (file)
@@ -22,7 +22,12 @@ va_sources = [
   'vasurfaceimage.c',
 ]
 
-if not gstva_dep.found()
+if host_system != 'linux'
+  subdir_done()
+endif
+
+va_option = get_option('va').require(gstva_dep.found(), error_message: 'va plugin requires libgstva.')
+if va_option.disabled()
   subdir_done()
 endif