diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/va/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/va/meson.build index 9c9b539d62..1af2e29f5b 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/va/meson.build +++ b/subprojects/gst-plugins-bad/gst-libs/gst/va/meson.build @@ -50,14 +50,20 @@ if host_system not in ['linux', 'windows'] endif va_opt = get_option('va') -msdk_opt = get_option('msdk') -qsv_opt = get_option('qsv') -if va_opt.disabled() and msdk_opt.disabled() and qsv_opt.disabled() - subdir_done() +if host_system == 'linux' + msdk_opt = get_option('msdk') + qsv_opt = get_option('qsv') + if va_opt.disabled() and msdk_opt.disabled() and qsv_opt.disabled() + subdir_done() + endif + va_required = va_opt.enabled() or msdk_opt.enabled() or qsv_opt.enabled() +else + if va_opt.disabled() + subdir_done() + endif + va_required = va_opt endif -va_required = va_opt.enabled() or msdk_opt.enabled() or qsv_opt.enabled() - libva_req = ['>= 1.6'] if host_system == 'windows' libva_req = ['>= 1.18'] @@ -77,7 +83,7 @@ if host_system == 'linux' endif platform_deps += [libva_drm_dep] - libdrm_dep = dependency('libdrm', version: '>=2.4', required: false) + libdrm_dep = dependency('libdrm', version: '>=2.4', required: get_option('drm')) if libdrm_dep.found() platform_deps += [libdrm_dep] extra_args += ['-DHAVE_LIBDRM'] diff --git a/subprojects/gst-plugins-bad/meson_options.txt b/subprojects/gst-plugins-bad/meson_options.txt index a3962373b9..86266be3f9 100644 --- a/subprojects/gst-plugins-bad/meson_options.txt +++ b/subprojects/gst-plugins-bad/meson_options.txt @@ -74,6 +74,8 @@ option('y4m', type : 'feature', value : 'auto') option('opencv', type : 'feature', value : 'auto', description : 'OpenCV computer vision library support') # Feature options for optional deps in plugins +option('drm', type : 'feature', value : 'auto', description: 'libdrm support in the GstVA library') +option('udev', type : 'feature', value : 'auto', description: 'gudev support in the new VA-API plugin') option('wayland', type : 'feature', value : 'auto', description : 'Wayland plugin/library, support in the Vulkan plugin') option('x11', type : 'feature', value : 'auto', description : 'X11 support in Vulkan, GL and rfb plugins') diff --git a/subprojects/gst-plugins-bad/sys/va/meson.build b/subprojects/gst-plugins-bad/sys/va/meson.build index 7227b39fb4..3e0a3f7060 100644 --- a/subprojects/gst-plugins-bad/sys/va/meson.build +++ b/subprojects/gst-plugins-bad/sys/va/meson.build @@ -54,7 +54,7 @@ extra_dep = [] c_std_arg = ['c_std=c99'] if host_system == 'linux' - libgudev_dep = dependency('gudev-1.0', required: false, allow_fallback: true) + libgudev_dep = dependency('gudev-1.0', required: get_option('udev'), allow_fallback: true) if libgudev_dep.found() extra_args += ['-DHAVE_GUDEV'] extra_dep += [libgudev_dep]