Skip to content

Conversation

@RossSmyth
Copy link
Contributor

@RossSmyth RossSmyth commented Jul 18, 2025

Thanks for this cool library.

This slightly reworks the meson build, primarily so that it can generate a pkgconfig file for ease of integration.

  1. Disable building tests by default. Now they will only build when meson test is called
  2. Only build the pkgconfig and tests when it is not a subproject. Consumers won't care if it's a subproject.
  3. Configure the amalgamation file with a *.c because Meson just ignores it otherwise
  4. Build the library (up to user what type)
  5. Install the header
  6. Generate the pkgconfig file

I do not know what Meson version you are targeting, so I just said 1.0. I also ran meson fmt on the top-level file.

@sammycage
Copy link
Owner

Interesting. Thank you for the wonderful contribution. Since the Meson build is mainly intended for tests and examples, I prefer to keep it minimal for now. Out of curiosity, what is your typical use case for needing a pkg-config file with this kind of library?

@RossSmyth
Copy link
Contributor Author

As stated, it makes it easier to compose the library in a program with other libraries, rather than needing to worry about specifics of whatever the library needs. Other course it means adding the header to the compiler search path, and adding the compiler flags needed.

@RossSmyth
Copy link
Contributor Author

It would be nice to package this library once it is ready to nixpkgs, so this is a good step for that as pkgconfig is mostly required in nixpkgs.

@sammycage sammycage merged commit 761d6d3 into sammycage:main Jul 21, 2025
3 checks passed
@RossSmyth RossSmyth deleted the meson branch July 24, 2025 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants