Skip to content

Add methods to BuildTargets for vala generated targets #14782

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 3 commits into
base: master
Choose a base branch
from

Conversation

dcbaker
Copy link
Member

@dcbaker dcbaker commented Jul 9, 2025

When compiling Vala we generating 2-3 files as side effects of the compilation. A C compatible header, a VAPI header, and possibly a GIR file. Currently, there is no good way to generate a dependency on those files.

With this PR that changes, as a build target has vala_header() vala_vapi() and vala_gir() method, each returning a File object pointing to their respective generated target. Calling these methods on a target that doesn't use Vala, or that doesn't generate a GIR file, will result in an error.

dcbaker added 3 commits July 9, 2025 15:02
This allows targets that don't link with a vala target to rely on the
header generation.
Copy link

@TheEvilSkeleton TheEvilSkeleton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no meson maintainer, but I provided the required steps in elementary/granite#873 (comment), as it depends on this PR to work. I can confirm that it builds successfully and works without any problems, so you have my approval on the testing side of things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants