wlroots/render/gles2/shaders/meson.build
Simon Ser 67fa22a8b5 render/gles2: check shaders once
We'd always check shaders each time we were building, even if the
shaders didn't change. This is caused by the check not producing
any file, so ninja can't check whether the output file is up-to-date.

Fix this by capturing the output and write to a file.

TODO: error messages are no longer visible.
2025-01-27 18:20:27 +01:00

31 lines
552 B
Meson

embed = find_program('./embed.sh', native: true)
shaders = [
'common.vert',
'quad.frag',
'tex_rgba.frag',
'tex_rgbx.frag',
'tex_external.frag',
]
foreach name : shaders
custom_target(
'gles2-' + name,
input: name,
output: name + '_check',
command: [glslang, '@INPUT@'],
capture: true,
build_by_default: true,
)
output = name.underscorify() + '_src.h'
var = name.underscorify() + '_src'
wlr_files += custom_target(
output,
command: [embed, var],
input: name,
output: output,
feed: true,
capture: true,
)
endforeach