From 6e5db5e4a226dc920a8959e8201d75f54c37dde2 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Fri, 29 Mar 2024 02:37:14 +0100 Subject: meson: install missing/generated headers one headers (args/root.hh) was simply missing, and the generated headers were not installed. not all of them *should* be installed either, only a select few (and sadly this needs a custom target for each one, it seems) Change-Id: I37b25517895d0e5e521abc1202fa65624de57ed1 --- src/libstore/meson.build | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/libstore/meson.build') diff --git a/src/libstore/meson.build b/src/libstore/meson.build index c4b12f61e..29dbc5e70 100644 --- a/src/libstore/meson.build +++ b/src/libstore/meson.build @@ -1,5 +1,14 @@ -schema_sql_gen = gen_header.process('schema.sql') -ca_specific_schema_gen = gen_header.process('ca-specific-schema.sql') +libstore_generated_headers = [] +foreach header : [ 'schema.sql', 'ca-specific-schema.sql' ] + libstore_generated_headers += custom_target( + command : [ 'bash', '-c', 'echo \'R"__NIX_STR(\' | cat - @INPUT@ && echo \')__NIX_STR"\'' ], + input : header, + output : '@PLAINNAME@.gen.hh', + capture : true, + install : true, + install_dir : includedir / 'nix', + ) +endforeach libstore_sources = files( 'binary-cache-store.cc', @@ -157,8 +166,7 @@ endforeach libstore = library( 'nixstore', - schema_sql_gen, - ca_specific_schema_gen, + libstore_generated_headers, libstore_sources, dependencies : [ libarchive, -- cgit v1.2.3