build: auto-disable shader_transpiler if offline translation used

This commit is contained in:
Andrei Alexeyev 2023-01-05 00:31:59 +01:00
parent 0a5b7a3d63
commit 95363b9c0e
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -8,7 +8,10 @@ r_shaderlib_src = files(
r_shaderlib_libdeps = []
opt_shader_transpiler = get_option('shader_transpiler')
# NOTE: transpile_glsl is for static, offline translation.
# It makes little sense to include the transpiler if that is used.
opt_shader_transpiler = get_option('shader_transpiler').disable_auto_if(transpile_glsl)
dep_spvc = dependency('spirv-cross-c-shared', required : opt_shader_transpiler)
dep_shaderc = dependency('shaderc', required : opt_shader_transpiler)
shader_transpiler_enabled = dep_spvc.found() and dep_shaderc.found()