meson: use relative file paths for file2string

This fixes "Generated from" comments to not include local source path in
generated files.
This commit is contained in:
Kacper Michajłow
2024-09-21 19:21:02 +02:00
parent ff47926d6a
commit 71f2220991
7 changed files with 20 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
defaults_js = custom_target('defaults.js',
input: join_paths(source_root, 'player', 'javascript', 'defaults.js'),
input: 'defaults.js',
output: 'defaults.js.inc',
command: [file2string, '@INPUT@', '@OUTPUT@'],
command: [file2string, '@INPUT@', '@OUTPUT@', '@SOURCE_ROOT@'],
)
sources += defaults_js

View File

@@ -3,9 +3,9 @@ lua_files = ['defaults.lua', 'assdraw.lua', 'options.lua', 'osc.lua',
'input.lua', 'fzy.lua', 'select.lua']
foreach file: lua_files
lua_file = custom_target(file,
input: join_paths(source_root, 'player', 'lua', file),
input: file,
output: file + '.inc',
command: [file2string, '@INPUT@', '@OUTPUT@'],
command: [file2string, '@INPUT@', '@OUTPUT@', '@SOURCE_ROOT@'],
)
sources += lua_file
endforeach