Repository navigation
Add native Meson build - #45
Merged
Merged
Conversation
Ship a header-only meson.build (declare_dependency + override_dependency + header install) so the project is consumable as a Meson subproject / WrapDB wrap without a downstream-maintained build description that can drift out of sync with the headers. examples/gps_track.cpp asserts its own results, so it doubles as an end-to-end smoke test; it is built standalone (or on -Dtests=enabled) and skipped when consumed as a subproject. A meson-build CI job runs it so the wrap can't rot silently.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a native Meson build alongside the existing CMake/build2 ones, so the library is consumable as a Meson subproject / WrapDB wrap without a downstream-maintained build description.
What's here
meson.build— header-only:declare_dependencyoninclude/,meson.override_dependency('geo-utils-cpp', …)sodependency('geo-utils-cpp')resolves in a consumer without pkg-config, andinstall_subdir('include/geo')formeson install.meson_options.txt— atestsfeature (defaultauto). The self-verifyingexamples/gps_track.cppis built standalone (or on-Dtests=enabled) and registered as a smoke test; it is not built when the library is pulled in as a subproject, so consumers don't compile our example into their tree.ci.yml— ameson-buildjob (meson setup+meson test) so the file can't drift out of sync with the header layout.Why
The WrapDB PR currently carries the build description in a downstream packagefile that hardcodes our internal layout. Shipping Meson upstream lets the wrap drop that packagefile and carry only the
.wrap(URL + hash) — the build description travels with the code and stays a single source of truth.Verified locally
meson test→gps_tracksmoke test passes (AppleClang 17, arm64).dependency('geo-utils-cpp')resolves,#include <geo/geo.hpp>compiles and runs, and the example target is absent from the consumer's build.versionis kept in sync withCMakeLists.txt/include/geo/version.hppby a comment; the existing test suite already asserts those two agree.