~tomleb/meson_libfoo

Project demonstrating the user of compile time options with Meson used for https://blog.tomlebreux.com/2020/05/04/first-steps-with-buildroot.html
7129ae26 — Tom Lebreux 1 year, 4 months ago
Add so version number and install to /usr/lib
fc7097d2 — Tom Lebreux 1 year, 4 months ago
Fix libxml-2.0 dependency
dee57f2a — Tom Lebreux 1 year, 4 months ago
Add license

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~tomleb/meson_libfoo
read/write
git@git.sr.ht:~tomleb/meson_libfoo

You can also use your local clone with git send-email.

#Meson C Project Libfoo

libfoo is a C library that does not do anything useful. It demonstrates dependencies with meson and how to use options for compile-time features.

libfoo is used in the blogpost First Steps with Buildroot to show how to select features using buildroot.

#Build

You can build this project with the following commands:

meson build
ninja -C build

By default, this will build the library with xml and yaml support. It is possible to use meson argument to disable support for each.

For example, to build without yaml support, you can run the following.

meson build -Dyaml=false
ninja -C build

You can then verify that libfoo.so does not include the function foo_yaml by running this:

nm -D build/libfoo.so

#Dependencies

libfoo depends on the following libraries:

  • libxml2 (can be disabled with -Dxml=false)
  • yaml-0.1 (can be disabled with -Dyaml=false)