Skip to content

Add --skip-if-not-found to meson install #14551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julianneswinoga
Copy link

Sometimes when a project is partially built we only want to install a subset of the possible targets. Example:

  • main project:
    • foo_app -> depends on libfoo. tagged as 'foo_app'
    • bar_app -> depends on libbar. tagged as 'bar_app'
  • subprojects
    • libfoo
    • libbar

When building foo_app (meson compile foo_app) libfoo is built because it is a dependency. When installing foo_app to test it (meson install --no-rebuild --tags foo_app,runtime) meson will try to install all targets that are tagged as runtime, regardless if they were built or not. This gives the error:

ERROR: File 'libbar.so' could not be found

because libbar is automatically tagged with 'runtime'. Since it is a subproject dependency, we can't add a specific install_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.

@julianneswinoga julianneswinoga requested a review from jpakkane as a code owner May 2, 2025 15:27
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.

1 participant