aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-01-01 21:49:03 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-02 22:29:08 +0200
commit3a6e2aeed9737f1082571e868ba50e72957f27c7 (patch)
tree97368bca44cb2b517c8b0101fab566d9c5df9c7a /docs
parent6c76ac80173bdc40d35e2d6b802f7950646781dc (diff)
downloadmeson-3a6e2aeed9737f1082571e868ba50e72957f27c7.zip
meson-3a6e2aeed9737f1082571e868ba50e72957f27c7.tar.gz
meson-3a6e2aeed9737f1082571e868ba50e72957f27c7.tar.bz2
Can use plain strings for include_directories.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-manual.md6
-rw-r--r--docs/markdown/snippets/includestr.md16
2 files changed, 20 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 92a7aed..0ddd4a9 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -349,7 +349,8 @@ keyword arguments.
- `compile_args`, compile arguments to use
- `dependencies`, other dependencies needed to use this dependency
- - `include_directories`, the directories to add to header search path
+ - `include_directories`, the directories to add to header search path,
+ must be include_directories objects or, since 0.50.0, plain strings
- `link_args`, link arguments to use
- `link_with`, libraries to link against
- `link_whole`, libraries to link fully, same as [`executable`](#executable)
@@ -530,7 +531,8 @@ be passed to [shared and static libraries](#library).
adds the current source and build directories to the include path,
defaults to `true`, since 0.42.0
- `include_directories` one or more objects created with the
- `include_directories` function
+ `include_directories` function, or, since 0.50.0, strings, which
+ will be transparently expanded to include directory objects
- `install`, when set to true, this executable should be installed
- `install_dir` override install directory for this file. The value is
relative to the `prefix` specified. F.ex, if you want to install
diff --git a/docs/markdown/snippets/includestr.md b/docs/markdown/snippets/includestr.md
new file mode 100644
index 0000000..fd4c130
--- /dev/null
+++ b/docs/markdown/snippets/includestr.md
@@ -0,0 +1,16 @@
+## `include_directories` accepts a string
+
+The `include_directories` keyword argument now accepts plain strings
+rather than an include directory object. Meson will transparently
+expand it so that a declaration like this:
+
+```meson
+executable(..., include_directories: 'foo')
+```
+
+Is equivalent to this:
+
+```meson
+foo_inc = include_directories('foo')
+executable(..., include_directories: inc)
+```