meson: check for vulkan headers

Vulkan dependency implies only vulkan loader, but some distributions
split vulkan-loader and vulkan-headers, so check if the headers are
actually there.
This commit is contained in:
Kacper Michajłow 2024-07-29 16:40:15 +02:00
parent 05b964fdec
commit f8700c5a94
1 changed files with 4 additions and 1 deletions

View File

@ -1273,7 +1273,10 @@ vulkan_opt = get_option('vulkan').require(
error_message: 'libplacebo compiled without vulkan support!',
)
vulkan = dependency('vulkan', version: '>= 1.1.70', required: vulkan_opt)
features += {'vulkan': vulkan.found()}
features += {'vulkan': vulkan.found() and (vulkan.type_name() == 'internal' or
cc.has_header_symbol('vulkan/vulkan_core.h',
'VK_VERSION_1_1',
dependencies: vulkan))}
if features['vulkan']
dependencies += vulkan
sources += files('video/out/vulkan/context.c',