Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
meson is a build system generator similar to cmake or autotools, but
without the craziness of either of those languages. It provides a pleasant
scripting language that is inspired by languages like python, but is not
python. It has a non-turring complete language, with an emphasis on
upstream functionality instead of downstream scripts. It has support for
most Unix-like OSes, including Linux, the four major BSDs, and macOS.
this includes support for abstracting dependency discovery, using
pkg-config, macOS frameworks, cmake, and some hand coded finders for
very common packages. It provides nice features like builtin support for debug builds,
changing from static to shared library builds, turning warning arguments
on and off, generates for pkg-config, and other modern niceties.
For g810-led this provides a number of advantages for distro packaging.
Distros already use meson for projects like mesa, systemd, and gnome, so
they're packaging wrappers already know how to configure, build, and
install meson based packages. It also provides advantages when moving to
other platforms, as meson understands the difference between clang,
apple's clang fork, gcc, and a host of other compilers.
I'll understand if you're not interested, I mostly wrote this for my own use (
the make system included doesn't work on my distro without passing a host
of linker flags due to where libraries are placed, but would work fine if
pkg-config was used). I thought I'd offer, since there's also work on using this
with macos, and meson would hopefully simplify that as well.
One major difference between the meson build and the markefile build is that
the meson build doesn't attempt to link a default profile, or run systemd commands
on install/uninstall. That really isn't something that the build system should be
doing, that's something the distro package manager should be doing for you.
I've additionally added a pkg-config file for the library, to make linking against
it simpler, especially when libhidapi is used, and an additional -D option needs
to be passed to the compiler.