From b75ad03313f3c1cc9fd56829829b09d58aaefb99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 28 May 2020 19:07:32 +0100 Subject: [PATCH] vulkan: don't run tests or build lib if plugin isn't actually built The unit tests only checked for vulkan_dep.found(), which can be true if the libs are there but glslc was not found, in which case the plugin wouldn't be built and the unit tests would fail because of missing vulkan plugins. Doesn't really make much sense to build the vulkan integration lib either if we're not going to build the vulkan plugin, so just disable both for now if glslc is not available. Fixes #1301 Part-of: --- ext/vulkan/meson.build | 5 +---- gst-libs/gst/vulkan/meson.build | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ext/vulkan/meson.build b/ext/vulkan/meson.build index 03e50d0..80f8559 100644 --- a/ext/vulkan/meson.build +++ b/ext/vulkan/meson.build @@ -10,10 +10,7 @@ if not gstvulkan_dep.found() endif endif -glslc = find_program('glslc', required: get_option('vulkan')) -if not glslc.found() - subdir_done() -endif +assert(glslc.found()) subdir('shaders') diff --git a/gst-libs/gst/vulkan/meson.build b/gst-libs/gst/vulkan/meson.build index 4897ec4..e35b555 100644 --- a/gst-libs/gst/vulkan/meson.build +++ b/gst-libs/gst/vulkan/meson.build @@ -249,7 +249,11 @@ if not vulkan_windowing warning('No Windowing system found. vulkansink will not work') endif -if not vulkan_dep.found() or not has_vulkan_header +# Only needed for the vulkan plugin, but doesn't make sense to build +# anything else vulkan related if we are not going to build the plugin +glslc = find_program('glslc', required: get_option('vulkan')) + +if not vulkan_dep.found() or not has_vulkan_header or not glslc.found() if get_option('vulkan').enabled() error('GStreamer Vulkan integration required via options, but needed dependencies not found.') else -- 2.7.4