-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
TheEvilSkeleton
left a comment
There was a problem hiding this 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.
|
Can you also update https://github.com/mesonbuild/meson/blob/master/docs/markdown/Vala.md#gobject-introspection-and-language-bindings with the use of vala_gir()? |
f7fd469 to
b8ff6cf
Compare
b8ff6cf to
deb96df
Compare
deb96df to
52912e3
Compare
|
I've also updated the gir docs in this version to have instructions for both the new and old methods. |
52912e3 to
733ff08
Compare
|
And I updated the yaml part of the docs, which is used to generate the reference manual. |
docs/markdown/Vala.md
Outdated
| To then generate a typelib file use a custom target with the | ||
| `g-ir-compiler` program and a dependency on the library: | ||
|
|
||
| Since Meson 1.10, use the `.vala_gir()` method to get a handle to the generated `.gir` file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should use asterisks like *Since 1.10*
|
Looks good other than the nit in the documentation! |
This allows targets that don't link with a vala target to rely on the header generation.
Same as the previous, but for VAPI
733ff08 to
a7a4843
Compare
a7a4843 to
7d51e0c
Compare
|
|
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()andvala_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.