From a3065c10b0a3505b0df6efc31550460d4a24b005 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Fri, 25 Jan 2019 16:56:17 -0600 Subject: [PATCH] GTK+: slang: Notify if SPIRV-Cross submodule is missing. --- gtk/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk/meson.build b/gtk/meson.build index cf4ff9e3..aba1663c 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -79,6 +79,16 @@ if opengl endif slang = get_option('slang') + +if slang and opengl + spirv_cross_hpp = join_paths(meson.source_root(), '../shaders/SPIRV-Cross/spirv_cross.hpp') + if not meson.get_compiler('cpp').compiles('#include "' + spirv_cross_hpp + '"') + slang = false + warns += 'Slang support needs the SPIRV-Cross directory in ../shaders' + warns += 'It can be downloaded with git submodule init; git submodule update' + endif +endif + if slang and opengl glslang_dep = c_compiler.find_library('glslang', required: false) spirv_dep = c_compiler.find_library('SPIRV', required: false)