aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-03-13 01:01:55 +0200
committerGitHub <noreply@github.com>2022-03-13 01:01:55 +0200
commit69ade4f4cf0123b7c38476b2972290d3d2a76b93 (patch)
tree76cd64e75748b8af0b7c7c85f0b1b7a9b1f4c523 /docs/markdown/snippets
parentbfdbf7bf6545236fa1077e3eea03a4f599c4cb8e (diff)
parentff4c283b3ac29f9f0cf067ceac2b1348964baeee (diff)
downloadmeson-69ade4f4cf0123b7c38476b2972290d3d2a76b93.zip
meson-69ade4f4cf0123b7c38476b2972290d3d2a76b93.tar.gz
meson-69ade4f4cf0123b7c38476b2972290d3d2a76b93.tar.bz2
Merge pull request #9339 from dcbaker/submit/structured_sources
Structured Sources
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/structured_sources.md26
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
+```