build: optionally build and install with meson
This commit adds several meson.build, which successfully build and
install Lix executables, libraries, and headers. Meson does not yet
build docs, Perl bindings, or run tests, which will be added in
following commits. As such, this commit does not remove the existing
build system, or make it the default, and also as such, this commit has
several FIXMEs and TODOs as notes for what should be done before the
existing autoconf + make buildsystem can be removed and Meson made the
default. This commit does not modify any source files.
A Meson-enabled build is also added as a Hydra job, and to
`nix flake check`.
Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4
2024-03-21 19:41:23 +00:00
|
|
|
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',
|
|
|
|
)
|
|
|
|
|
|
|
|
libfetchers_headers = files(
|
|
|
|
'attrs.hh',
|
|
|
|
'cache.hh',
|
|
|
|
'fetch-settings.hh',
|
|
|
|
'fetch-to-store.hh',
|
|
|
|
'fetchers.hh',
|
|
|
|
'registry.hh',
|
|
|
|
)
|
|
|
|
|
|
|
|
libfetchers = library(
|
2024-05-17 00:04:05 +00:00
|
|
|
'lixfetchers',
|
build: optionally build and install with meson
This commit adds several meson.build, which successfully build and
install Lix executables, libraries, and headers. Meson does not yet
build docs, Perl bindings, or run tests, which will be added in
following commits. As such, this commit does not remove the existing
build system, or make it the default, and also as such, this commit has
several FIXMEs and TODOs as notes for what should be done before the
existing autoconf + make buildsystem can be removed and Meson made the
default. This commit does not modify any source files.
A Meson-enabled build is also added as a Hydra job, and to
`nix flake check`.
Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4
2024-03-21 19:41:23 +00:00
|
|
|
libfetchers_sources,
|
|
|
|
dependencies : [
|
|
|
|
liblixstore,
|
|
|
|
liblixutil,
|
2024-03-27 03:09:43 +00:00
|
|
|
nlohmann_json,
|
build: optionally build and install with meson
This commit adds several meson.build, which successfully build and
install Lix executables, libraries, and headers. Meson does not yet
build docs, Perl bindings, or run tests, which will be added in
following commits. As such, this commit does not remove the existing
build system, or make it the default, and also as such, this commit has
several FIXMEs and TODOs as notes for what should be done before the
existing autoconf + make buildsystem can be removed and Meson made the
default. This commit does not modify any source files.
A Meson-enabled build is also added as a Hydra job, and to
`nix flake check`.
Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4
2024-03-21 19:41:23 +00:00
|
|
|
],
|
2024-06-06 18:46:26 +00:00
|
|
|
cpp_pch : cpp_pch,
|
build: optionally build and install with meson
This commit adds several meson.build, which successfully build and
install Lix executables, libraries, and headers. Meson does not yet
build docs, Perl bindings, or run tests, which will be added in
following commits. As such, this commit does not remove the existing
build system, or make it the default, and also as such, this commit has
several FIXMEs and TODOs as notes for what should be done before the
existing autoconf + make buildsystem can be removed and Meson made the
default. This commit does not modify any source files.
A Meson-enabled build is also added as a Hydra job, and to
`nix flake check`.
Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4
2024-03-21 19:41:23 +00:00
|
|
|
install : true,
|
|
|
|
# FIXME(Qyriad): is this right?
|
|
|
|
install_rpath : libdir,
|
|
|
|
)
|
|
|
|
|
2024-05-17 00:04:05 +00:00
|
|
|
install_headers(libfetchers_headers, subdir : 'lix/libfetchers', preserve_path : true)
|
|
|
|
|
|
|
|
# FIXME: not using the pkg-config module because it creates way too many deps
|
|
|
|
# while meson migration is in progress, and we want to not include boost here
|
|
|
|
configure_file(
|
|
|
|
input : 'lix-fetchers.pc.in',
|
|
|
|
output : 'lix-fetchers.pc',
|
|
|
|
install_dir : libdir / 'pkgconfig',
|
|
|
|
configuration : {
|
|
|
|
'prefix' : prefix,
|
|
|
|
'libdir' : libdir,
|
|
|
|
'includedir' : includedir,
|
|
|
|
'PACKAGE_VERSION' : meson.project_version(),
|
|
|
|
},
|
|
|
|
)
|
build: optionally build and install with meson
This commit adds several meson.build, which successfully build and
install Lix executables, libraries, and headers. Meson does not yet
build docs, Perl bindings, or run tests, which will be added in
following commits. As such, this commit does not remove the existing
build system, or make it the default, and also as such, this commit has
several FIXMEs and TODOs as notes for what should be done before the
existing autoconf + make buildsystem can be removed and Meson made the
default. This commit does not modify any source files.
A Meson-enabled build is also added as a Hydra job, and to
`nix flake check`.
Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4
2024-03-21 19:41:23 +00:00
|
|
|
|
|
|
|
liblixfetchers = declare_dependency(
|
|
|
|
include_directories : include_directories('.'),
|
|
|
|
link_with : libfetchers,
|
|
|
|
)
|
2024-05-30 23:10:10 +00:00
|
|
|
|
|
|
|
# FIXME: remove when https://git.lix.systems/lix-project/lix/issues/359 is fixed.
|
|
|
|
if is_static
|
|
|
|
liblixfetchers_mstatic = declare_dependency(
|
|
|
|
include_directories : include_directories('.'),
|
|
|
|
link_whole : libfetchers,
|
|
|
|
)
|
|
|
|
else
|
|
|
|
liblixfetchers_mstatic = liblixfetchers
|
|
|
|
endif
|