From 435e881c18cda15fc4f8fc9e42f566cdc86cd791 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 12 Jun 2023 08:46:21 -0400 Subject: cargo: Call into meson subdir if it exists This allows projects to manually add extra rust args and deps. This is intended to replace build.rs logic. --- docs/markdown/Wrap-dependency-system-manual.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/markdown/Wrap-dependency-system-manual.md b/docs/markdown/Wrap-dependency-system-manual.md index 70a7b3023..bba1971c4 100644 --- a/docs/markdown/Wrap-dependency-system-manual.md +++ b/docs/markdown/Wrap-dependency-system-manual.md @@ -356,6 +356,14 @@ project(..., ) ``` +In addition, if the file `meson/meson.build` exists, Meson will call `subdir('meson')` +where the project can add manual logic that would usually be part of `build.rs`. +Some naming conventions need to be respected: +- The `extra_args` variable is pre-defined and can be used to add any Rust arguments. + This is typically used as `extra_args += ['--cfg', 'foo']`. +- The `extra_deps` variable is pre-defined and can be used to add extra dependencies. + This is typically used as `extra_deps += dependency('foo')`. + ## Using wrapped projects Wraps provide a convenient way of obtaining a project into your -- cgit v1.2.3