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.
This commit is contained in:
Ivan 2021-03-17 20:52:20 +02:00
parent 83443967a0
commit 529f4d318f
2 changed files with 3 additions and 2 deletions

View file

@ -30,7 +30,8 @@ if not get_option('spa-plugins').disabled()
avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg')) avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg'))
avformat_dep = dependency('libavformat', required: get_option('ffmpeg')) avformat_dep = dependency('libavformat', required: get_option('ffmpeg'))
jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack')) 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')) libcamera_dep = dependency('camera', required: get_option('libcamera'))
subdir('plugins') subdir('plugins')

View file

@ -35,7 +35,7 @@ endif
if not get_option('volume').disabled() if not get_option('volume').disabled()
subdir('volume') subdir('volume')
endif endif
if vulkan_dep.found() if vulkan_headers
subdir('vulkan') subdir('vulkan')
endif endif
if libudev_dep.found() and not get_option('v4l2').disabled() if libudev_dep.found() and not get_option('v4l2').disabled()