mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
Make the xxd command in shader/meson.build less fragile
This commit is contained in:
parent
79f9108748
commit
ceea260b82
2 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@ if host_system == 'darwin'
|
|||
endif
|
||||
|
||||
xxd = find_program('xxd', native: true)
|
||||
xxd_supports_n = run_command(xxd, '-n', 'meson', '-i', meson.current_source_dir() / 'meson.build', check: false).returncode() == 0
|
||||
|
||||
git_hash = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
|
||||
|
||||
|
|
|
@ -41,7 +41,9 @@ foreach file : embedded_shaders_f
|
|||
global_sources += custom_target(embedded_shaders[count],
|
||||
input: file,
|
||||
output: '@0@.xxd'.format(embedded_shaders[count]),
|
||||
command: [
|
||||
command: xxd_supports_n ? [
|
||||
xxd, '-n', '___shader_@0@'.format(embedded_shaders[count].replace('.', '_')), '-i', '@INPUT@'
|
||||
] : [
|
||||
xxd, '-i', '@INPUT@'
|
||||
],
|
||||
capture: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue