From 1ec39d1c7b58b87c9a813183b860984e62b2e238 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Tue, 29 Mar 2022 17:54:30 +0200 Subject: [PATCH] Make libinih a fallback dependency This means that in case meson does not find libinih it will automatically clone libinih and include it in the build. The libinih library is reconfigured to be statically built so that no shared object will be installed. --- .gitignore | 1 + src/meson.build | 4 +++- subprojects/libinih.wrap | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 subprojects/libinih.wrap diff --git a/.gitignore b/.gitignore index b5da578..1eef64a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /build +/subprojects/libinih *.swp diff --git a/src/meson.build b/src/meson.build index 3feac16..6f1e737 100644 --- a/src/meson.build +++ b/src/meson.build @@ -15,7 +15,9 @@ tio_sources = [ 'signals.c' ] -tio_dep = dependency('inih', required: true) +tio_dep = dependency('inih', required: true, + fallback : ['libinih', 'inih_dep'], + default_options: ['default_library=static', 'distro_install=false']) tio_c_args = ['-Wno-unused-result'] diff --git a/subprojects/libinih.wrap b/subprojects/libinih.wrap new file mode 100644 index 0000000..c9d1760 --- /dev/null +++ b/subprojects/libinih.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory=libinih +url=https://github.com/benhoyt/inih.git +revision=r55