mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
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.
31 lines
552 B
Meson
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
|