-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add docs for structured_sources
- Loading branch information
Showing
3 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## structured_sources() | ||
|
||
A new function, `structured_sources()` has been added. This function allows | ||
languages like Rust and Cython 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, so that | ||
the desired file structure is laid out, and compile that. In this case: | ||
|
||
``` | ||
root/ | ||
main.rs | ||
mod/ | ||
mod.rs | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: structured_src | ||
long_name: Structured Source | ||
description: Opaque object returned by [[structured_source]]. |