diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-03-04 15:26:50 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2022-03-07 12:33:33 -0800 |
commit | 9cf7a125613f8cc929828780b8c7aefd0d3ee4ac (patch) | |
tree | 411a5ce09688f2a466871f2bf36b735c0ae53690 /docs/markdown/snippets | |
parent | 038d0723647f58d62754afb8f4dca7dc716a5ba8 (diff) | |
download | meson-9cf7a125613f8cc929828780b8c7aefd0d3ee4ac.zip meson-9cf7a125613f8cc929828780b8c7aefd0d3ee4ac.tar.gz meson-9cf7a125613f8cc929828780b8c7aefd0d3ee4ac.tar.bz2 |
docs: Add docs for structured_sources
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/structured_sources.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/markdown/snippets/structured_sources.md b/docs/markdown/snippets/structured_sources.md new file mode 100644 index 0000000..19fdc86 --- /dev/null +++ b/docs/markdown/snippets/structured_sources.md @@ -0,0 +1,26 @@ +## structured_sources() + +A new function, `structured_sources()` has been added. This function allows +languages like Rust which depend on the filesystem layout at compile time to mix +generated and static sources. + +```meson +executable( + 'main', + structured_sources( + 'main.rs, + {'mod' : generated_mod_rs}, + ) +) +``` + +Meson will then at build time copy the files into the build directory (if +necessary), so that the desired file structure is laid out, and compile that. In +this case: + +``` +root/ + main.rs + mod/ + mod.rs +``` |