summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-01-01 21:49:03 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-01 21:49:03 +0200
commit8ce604ba838d4621368b6dad4d424a341168829f (patch)
tree936ec35cb4bfd16fa13c80e8d510a4ab35fcf00b /docs/markdown
parent31e1a310309f6a3c46ff837414f70ee120397565 (diff)
downloadmeson-includestr.tar.gz
Can use plain strings for include_directories.includestr
Diffstat (limited to 'docs/markdown')
-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 92a7aed7e..0ddd4a921 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 000000000..fd4c1303c
--- /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)
+```