aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-10-19 12:20:56 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-10-19 06:51:14 -0600
commit36cf38742734b003b2abbcd1de910771a8454ef1 (patch)
tree7e122bf4825cf6a54cb3366ba335db11b2214e29 /render
parentf7ea33da0a87451251683ec9a7d86f7d3da9058d (diff)
render/vulkan: check vulkan-headers dependency
There's no pkg-config file we can check for sadly, so check vulkan/vulkan.h as a fallback. Closes: https://github.com/swaywm/wlroots/issues/3272
Diffstat (limited to 'render')
-rw-r--r--render/vulkan/meson.build11
1 files changed, 10 insertions, 1 deletions
diff --git a/render/vulkan/meson.build b/render/vulkan/meson.build
index 6b9ce840..6ae8df0c 100644
--- a/render/vulkan/meson.build
+++ b/render/vulkan/meson.build
@@ -10,11 +10,20 @@ dep_vulkan = dependency('vulkan',
required: 'vulkan' in renderers,
not_found_message: '\n'.join(msg).format('vulkan')
)
-
if not dep_vulkan.found()
subdir_done()
endif
+# Vulkan headers are installed separately from the loader (which ships the
+# pkg-config file)
+if not cc.check_header('vulkan/vulkan.h', dependencies: dep_vulkan)
+ if 'vulkan' in renderers
+ error('\n'.join(msg).format('vulkan-headers'))
+ else
+ subdir_done()
+ endif
+endif
+
glslang = find_program('glslangValidator', native: true, required: false)
if not glslang.found()
if 'vulkan' in renderers