From 529f4d318fb7de724f30ed3b20126a9895fbc7de Mon Sep 17 00:00:00 2001 From: Ivan Date: Wed, 17 Mar 2021 20:52:20 +0200 Subject: [PATCH] meson: Fix build without vulkan headers Some distros ship Vulkan headers separately. In that case dependency check is passed but build is failing due to the missing headers. --- spa/meson.build | 3 ++- spa/plugins/meson.build | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spa/meson.build b/spa/meson.build index 170503e0e..6c207e89f 100644 --- a/spa/meson.build +++ b/spa/meson.build @@ -30,7 +30,8 @@ if not get_option('spa-plugins').disabled() avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg')) avformat_dep = dependency('libavformat', required: get_option('ffmpeg')) jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack')) - vulkan_dep = dependency('vulkan', version : '>= 1.1.69', required: get_option('vulkan')) + vulkan_dep = dependency('vulkan', disabler : true, version : '>= 1.1.69', required: get_option('vulkan')) + vulkan_headers = cc.has_header('vulkan/vulkan.h', dependencies : vulkan_dep) libcamera_dep = dependency('camera', required: get_option('libcamera')) subdir('plugins') diff --git a/spa/plugins/meson.build b/spa/plugins/meson.build index 1651e5532..9bdcedc96 100644 --- a/spa/plugins/meson.build +++ b/spa/plugins/meson.build @@ -35,7 +35,7 @@ endif if not get_option('volume').disabled() subdir('volume') endif -if vulkan_dep.found() +if vulkan_headers subdir('vulkan') endif if libudev_dep.found() and not get_option('v4l2').disabled()