diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-05-01 00:01:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-01 00:01:03 +0300 |
commit | bba588d8b03a9125bf5c4faaad31b70d39242b68 (patch) | |
tree | 63afdf87d9a5bfbb0953170ac89a46bedb02710d /docs | |
parent | b30d04f52b5e13bf0c1047439465997184869c09 (diff) | |
parent | c181f2c70bd606f0100f74844fcf9697be16c217 (diff) | |
download | meson-bba588d8b03a9125bf5c4faaad31b70d39242b68.zip meson-bba588d8b03a9125bf5c4faaad31b70d39242b68.tar.gz meson-bba588d8b03a9125bf5c4faaad31b70d39242b68.tar.bz2 |
Merge pull request #10039 from eli-schwartz/wayland-protocols-subproject-files
dependencies: allow get_variable to expose files from subprojects
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Dependencies.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md index 15da929..a3e5a00 100644 --- a/docs/markdown/Dependencies.md +++ b/docs/markdown/Dependencies.md @@ -90,6 +90,28 @@ following will happen: If 'default_value' was provided that value will be returned, if 'default_value' was not provided then an error will be raised. +## Dependencies that provide resource files + +Sometimes a dependency provides installable files which other projects then +need to use. For example, wayland-protocols XML files. + +```meson +foo_dep = dependency('foo') +foo_datadir = foo_dep.get_variable('pkgdatadir') +custom_target( + 'foo-generated.c', + input: foo_datadir / 'prototype.xml', + output: 'foo-generated.c', + command: [generator, '@INPUT@', '@OUTPUT@'] +) +``` + +*Since 0.63.0* these actually work as expected, even when they come from a +(well-formed) internal dependency. This only works when treating the files to +be obtained as interchangeable with a system dependency -- e.g. only public +files may be used, and leaving the directory pointed to by the dependency is +not allowed. + # Declaring your own You can declare your own dependency objects that can be used |