diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-06-16 08:44:10 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-08 10:42:41 -0700 |
| commit | a5094a134aa8b2a971153ed8446f27d986f476e7 (patch) | |
| tree | 821380b5b6f801d66181abad34ef17f499999f8f /docs/markdown | |
| parent | 8d69552dbd61144cdeab4ac93137db672c62fd52 (diff) | |
| download | meson-a5094a134aa8b2a971153ed8446f27d986f476e7.tar.gz | |
vala: add a method to get a generated vala header
This allows targets that don't link with a vala target to rely on the
header generation.
Diffstat (limited to 'docs/markdown')
| -rw-r--r-- | docs/markdown/Vala.md | 13 | ||||
| -rw-r--r-- | docs/markdown/snippets/vala-target-extra-methods.md | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/docs/markdown/Vala.md b/docs/markdown/Vala.md index fdc4fbae4..23ff57018 100644 --- a/docs/markdown/Vala.md +++ b/docs/markdown/Vala.md @@ -304,6 +304,19 @@ In this example, the second and third elements of the `install_dir` array indicate the destination with `true` to use default directories (i.e. `include` and `share/vala/vapi`). +### Depending on C header + +*(since 1.10.0)* + +Given the previous example, + +```meson +foo_lib = shared_library(...) +foo_h = foo_lib.vala_header() +``` + +This header can now be used like any other generated header to create an +order-only dependency. ### GObject Introspection and language bindings diff --git a/docs/markdown/snippets/vala-target-extra-methods.md b/docs/markdown/snippets/vala-target-extra-methods.md new file mode 100644 index 000000000..1c7867e4f --- /dev/null +++ b/docs/markdown/snippets/vala-target-extra-methods.md @@ -0,0 +1,12 @@ +## Vala BuildTarget dependency enhancements + +A BuildTarget that has Vala sources can now get a File dependency for its +generated header. + +```meson +lib = library('foo', 'foo.vala') +lib_h = lib.vala_header() +lib_s = static_lib('static', 'static.c', lib_h) +``` + +`static.c` will not start compilation until `lib.h` is generated. |
