From f8700c5a942b7fbf45b54848ae6de4bba96cb1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 29 Jul 2024 16:40:15 +0200 Subject: [PATCH] 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. --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 25cf832c6a..f071cb484a 100644 --- a/meson.build +++ b/meson.build @@ -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',