aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/install_headers_preserve_path_arg.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/markdown/snippets/install_headers_preserve_path_arg.md b/docs/markdown/snippets/install_headers_preserve_path_arg.md
new file mode 100644
index 0000000..c41fceb
--- /dev/null
+++ b/docs/markdown/snippets/install_headers_preserve_path_arg.md
@@ -0,0 +1,35 @@
+## Added preserve_path arg to install_headers
+
+The [[install_headers]] function now has an optional argument `preserve_path`
+that allows installing multi-directory headerfile structures that live
+alongside sourcecode with a single command.
+
+For example, the headerfile structure
+
+```meson
+headers = [
+ 'one.h',
+ 'two.h',
+ 'alpha/one.h',
+ 'alpha/two.h',
+ 'alpha/three.h'
+ 'beta/one.h'
+]
+```
+
+can now be passed to `install_headers(headers, subdir: 'mylib', preserve_path: true)`
+and the resulting directory tree will look like
+
+```
+{prefix}
+└── include
+    └── mylib
+       ├── alpha
+       │   ├── one.h
+       │   ├── two.h
+       │   └── three.h
+       ├── beta
+       │   └── one.h
+       ├── one.h
+       └── two.h
+```