1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 16:02:43 +01:00

Use a meson "generator" to deduplicate .gen.hh creation

This commit is contained in:
John Ericson 2024-07-08 09:47:25 -04:00
parent d8850618b6
commit 6e5cec292b
5 changed files with 18 additions and 22 deletions

View file

@ -99,18 +99,14 @@ deps_public += nlohmann_json
sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19')
deps_private += sqlite
subdir('build-utils-meson/generate-header')
generated_headers = []
foreach header : [
'schema.sql',
'ca-specific-schema.sql',
]
generated_headers += custom_target(
command : [ 'bash', '-c', '{ echo \'R"__NIX_STR(\' && cat @INPUT@ && echo \')__NIX_STR"\'; } > "$1"', '_ignored_argv0', '@OUTPUT@' ],
input : header,
output : '@PLAINNAME@.gen.hh',
install : true,
install_dir : get_option('includedir') / 'nix',
)
generated_headers += gen_header.process(header)
endforeach
busybox = find_program(get_option('sandbox-shell'), required : false)