From 6c05dabc47389f471c435394c13981d92f288d9b Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 16 Jun 2025 08:46:14 -0700 Subject: vala: Add method to build_target to get generated vapi file Same as the previous, but for VAPI --- docs/markdown/Vala.md | 11 +++++++++++ docs/markdown/snippets/vala-target-extra-methods.md | 4 +++- docs/yaml/objects/build_tgt.yaml | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/markdown/Vala.md b/docs/markdown/Vala.md index 23ff57018..af9426352 100644 --- a/docs/markdown/Vala.md +++ b/docs/markdown/Vala.md @@ -318,6 +318,17 @@ foo_h = foo_lib.vala_header() This header can now be used like any other generated header to create an order-only dependency. +### Depending on VAPI header + +*(since 1.10.0)* + +Given the previous example, + +```meson +foo_lib = shared_library(...) +foo_vapi = foo_lib.vala_vapi() +``` + ### GObject Introspection and language bindings A 'binding' allows another programming language to use a library diff --git a/docs/markdown/snippets/vala-target-extra-methods.md b/docs/markdown/snippets/vala-target-extra-methods.md index 1c7867e4f..72d89e56e 100644 --- a/docs/markdown/snippets/vala-target-extra-methods.md +++ b/docs/markdown/snippets/vala-target-extra-methods.md @@ -1,12 +1,14 @@ ## Vala BuildTarget dependency enhancements A BuildTarget that has Vala sources can now get a File dependency for its -generated header. +generated header and generated vapi. ```meson lib = library('foo', 'foo.vala') lib_h = lib.vala_header() lib_s = static_lib('static', 'static.c', lib_h) + +lib_vapi = lib.vala_vapi() ``` `static.c` will not start compilation until `lib.h` is generated. diff --git a/docs/yaml/objects/build_tgt.yaml b/docs/yaml/objects/build_tgt.yaml index 7229de590..da64a469e 100644 --- a/docs/yaml/objects/build_tgt.yaml +++ b/docs/yaml/objects/build_tgt.yaml @@ -85,3 +85,11 @@ methods: Returns a [[@file]] object pointing to a C compatible header generated by the vala compiler, if this target does not generate a vala header then it is an error to call this method. + +- name: vala_vapi + returns: file + since: 1.10.0 + description: | + Returns a [[@file]] object pointing to a VAPI header generated by the vala + compiler, if this target does not generate a VAPI file then it is an error + to call this method. -- cgit v1.2.3