meson: Install Cargo-generated lib directly #450
+4
−8
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.
Currently, when building with Meson, an archive is created containing the archive generated by Cargo (so not directly the object files contained withing the Cargo-generated archive). This causes issues when linking and required an explicit
ranlib
orar -s
step to be issued before the library is usable:It doesn't look like
static_library
really supports this kind of usecase.This PR simply installs the static library artifact generated by Cargo directly instead. Unfortunately I don't think there's an elegant way to pass a meson library object to
pkg.generate
in this situation, so I've just setlibraries
manually (since it allows arbitrary strings). I'm by no means a Meson expert so do let me know if there's a better way that I'm overlooking :)@KentaTheBugMaker pinging you as the original author of
meson.build
(#84) for your input.