From 2e63336bf3e58eb3364bd8f7eedddbbc40ee6f69 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 16 Jun 2025 08:46:52 -0700 Subject: vala: Add method to get generated GIR from a build_target Fixes: #2296 Fixes: #4481 Fixes: #5968 --- docs/markdown/snippets/vala-target-extra-methods.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'docs/markdown/snippets') 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. -- cgit v1.2.3