Add --skip-if-not-found to meson install #14551
Open
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.
Sometimes when a project is partially built we only want to install a subset of the possible targets. Example:
foo_app
-> depends onlibfoo
. tagged as 'foo_app'bar_app
-> depends onlibbar
. tagged as 'bar_app'libfoo
libbar
When building
foo_app
(meson compile foo_app
)libfoo
is built because it is a dependency. When installingfoo_app
to test it (meson install --no-rebuild --tags foo_app,runtime
)meson
will try to install all targets that are tagged asruntime
, regardless if they were built or not. This gives the error:because
libbar
is automatically tagged with 'runtime'. Since it is a subproject dependency, we can't add a specificinstall_tag
so we need to rely on the automatic 'runtime' tag.This is a toy example, but the repo I am working with has many executable targets with varying library dependencies, so compiling + installing only a subset is needed for a nice developer experience.