meson: we can now build libfetchers!

Change-Id: Ic3a64bbc6bb1a77d01652f339f62b7f301e6e7dc
This commit is contained in:
Qyriad 2024-03-12 21:58:53 -06:00
parent e2310d7cb2
commit 1af43a19a2
4 changed files with 32 additions and 1 deletions

View file

@ -193,3 +193,4 @@ add_project_arguments(
subdir('src/libutil') subdir('src/libutil')
# Load-bearing order. libstore depends on libutil (includes). # Load-bearing order. libstore depends on libutil (includes).
subdir('src/libstore') subdir('src/libstore')
subdir('src/libfetchers')

View file

@ -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,
],
)

View file

@ -106,7 +106,7 @@ foreach name, value : cpp_str_defines
] ]
endforeach endforeach
library( libstore = library(
'nixstore', 'nixstore',
libstore_sources, libstore_sources,
schema_sql_gen, schema_sql_gen,
@ -123,3 +123,9 @@ library(
], ],
cpp_args : cpp_args, cpp_args : cpp_args,
) )
# Used by libfetchers.
liblixstore = declare_dependency(
include_directories : include_directories('.'),
link_with : libstore,
)

View file

@ -49,6 +49,7 @@ libutil = library(
implicit_include_directories : true, implicit_include_directories : true,
) )
# Used by libstore and libfetchers.
liblixutil = declare_dependency( liblixutil = declare_dependency(
include_directories : include_directories('.'), include_directories : include_directories('.'),
link_with : libutil link_with : libutil