From 1af43a19a2200533476982afba6d28638a4401d6 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Tue, 12 Mar 2024 21:58:53 -0600 Subject: [PATCH] meson: we can now build libfetchers! Change-Id: Ic3a64bbc6bb1a77d01652f339f62b7f301e6e7dc --- meson.build | 1 + src/libfetchers/meson.build | 23 +++++++++++++++++++++++ src/libstore/meson.build | 8 +++++++- src/libutil/meson.build | 1 + 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/libfetchers/meson.build diff --git a/meson.build b/meson.build index c3aa68549..e71d2ca2b 100644 --- a/meson.build +++ b/meson.build @@ -193,3 +193,4 @@ add_project_arguments( subdir('src/libutil') # Load-bearing order. libstore depends on libutil (includes). subdir('src/libstore') +subdir('src/libfetchers') diff --git a/src/libfetchers/meson.build b/src/libfetchers/meson.build new file mode 100644 index 000000000..650c63f45 --- /dev/null +++ b/src/libfetchers/meson.build @@ -0,0 +1,23 @@ +libfetchers_sources = files( + 'attrs.cc', + 'cache.cc', + 'fetch-settings.cc', + 'fetch-to-store.cc', + 'fetchers.cc', + 'git.cc', + 'github.cc', + 'indirect.cc', + 'mercurial.cc', + 'path.cc', + 'registry.cc', + 'tarball.cc', +) + +library( + 'nixfetchers', + libfetchers_sources, + dependencies : [ + liblixstore, + liblixutil, + ], +) diff --git a/src/libstore/meson.build b/src/libstore/meson.build index 4c2593904..2590ecb0c 100644 --- a/src/libstore/meson.build +++ b/src/libstore/meson.build @@ -106,7 +106,7 @@ foreach name, value : cpp_str_defines ] endforeach -library( +libstore = library( 'nixstore', libstore_sources, schema_sql_gen, @@ -123,3 +123,9 @@ library( ], cpp_args : cpp_args, ) + +# Used by libfetchers. +liblixstore = declare_dependency( + include_directories : include_directories('.'), + link_with : libstore, +) diff --git a/src/libutil/meson.build b/src/libutil/meson.build index 9cdde2d8e..57812d8a4 100644 --- a/src/libutil/meson.build +++ b/src/libutil/meson.build @@ -49,6 +49,7 @@ libutil = library( implicit_include_directories : true, ) +# Used by libstore and libfetchers. liblixutil = declare_dependency( include_directories : include_directories('.'), link_with : libutil