diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-06-16 08:46:52 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-08 10:42:41 -0700 |
| commit | 2e63336bf3e58eb3364bd8f7eedddbbc40ee6f69 (patch) | |
| tree | 36263b00ad974ffb9f4cd497afe5aa6e3625a3bb /docs/markdown/snippets | |
| parent | 6c05dabc47389f471c435394c13981d92f288d9b (diff) | |
| download | meson-2e63336bf3e58eb3364bd8f7eedddbbc40ee6f69.tar.gz | |
vala: Add method to get generated GIR from a build_target
Fixes: #2296
Fixes: #4481
Fixes: #5968
Diffstat (limited to 'docs/markdown/snippets')
| -rw-r--r-- | docs/markdown/snippets/vala-target-extra-methods.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/markdown/snippets/vala-target-extra-methods.md b/docs/markdown/snippets/vala-target-extra-methods.md index 72d89e56e..526f557a2 100644 --- a/docs/markdown/snippets/vala-target-extra-methods.md +++ b/docs/markdown/snippets/vala-target-extra-methods.md @@ -1,7 +1,7 @@ ## Vala BuildTarget dependency enhancements A BuildTarget that has Vala sources can now get a File dependency for its -generated header and generated vapi. +generated header, vapi, and gir files. ```meson lib = library('foo', 'foo.vala') @@ -9,6 +9,13 @@ lib_h = lib.vala_header() lib_s = static_lib('static', 'static.c', lib_h) lib_vapi = lib.vala_vapi() + +custom_target( + 'foo-typelib', + command : ['g-ir-compiler', '--output', '@OUTPUT@', '@INPUT@'], + input : lib.vala_gir(), + output : 'Foo-1.0.typelib' +) ``` `static.c` will not start compilation until `lib.h` is generated. |
