From de72ed55904919bd1c98a0d537189bf5c796706f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikl=C4=81vs=20Ko=C4=BCes=C5=86ikovs?= <89q1r14hd@relay.firefox.com> Date: Fri, 25 Jun 2021 14:54:26 +0300 Subject: [PATCH] meson.build: adds V4L2 header and enablement reporting via summary() Until now the 'v4l2' feature was not actually checking that its required header has been found, this commit adds a check for and correctly reports both header status and whether the feature itself ends up enabled (depends on libudev). --- spa/plugins/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spa/plugins/meson.build b/spa/plugins/meson.build index c54304f39..fd229d460 100644 --- a/spa/plugins/meson.build +++ b/spa/plugins/meson.build @@ -40,7 +40,12 @@ endif if vulkan_headers subdir('vulkan') endif -if libudev_dep.found() and not get_option('v4l2').disabled() + +v4l2_header_found = cc.has_header('linux/videodev2.h', required: get_option('v4l2')) +v4l2_supported = libudev_dep.found() and v4l2_header_found +summary({'V4L2 kernel header': v4l2_header_found}, bool_yn: true, section: 'Backend') +summary({'V4L2 enabled': v4l2_supported}, bool_yn: true, section: 'Backend') +if v4l2_supported subdir('v4l2') endif if libcamera_dep.found()