From b74db1dda2dee2c9a4b5c5e72fd4c2c595cf4ccc Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 12 Aug 2021 22:13:17 -0400 Subject: Document that custom_target() install_dir can be a list --- docs/markdown/Reference-manual.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index e96a6fc..81a6daf 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -375,7 +375,26 @@ following. in any one of these files triggers a recompilation - `input`: list of source files. *(since 0.41.0)* the list is flattened. - `install`: when true, this target is installed during the install step -- `install_dir`: directory to install to +- `install_dir`: If only one install_dir is provided, all outputs are installed there. + *Since 0.40.0* Allows you to specify the installation directory for each + corresponding output. For example: + ``` + custom_target('different-install-dirs', + output : ['first.file', 'second.file'], + install : true, + install_dir : ['somedir', 'otherdir]) + ``` + This would install `first.file` to `somedir` and `second.file` to `otherdir`. + + To only install some outputs, pass `false` for the outputs that you + don't want installed. For example: + ``` + custom_target('only-install-second', + output : ['first.file', 'second.file'], + install : true, + install_dir : [false, 'otherdir]) + ``` + This would install `second.file` to `otherdir` and not install `first.file`. - `install_mode` *(since 0.47.0)*: the file mode and optionally the owner/uid and group/gid - `output`: list of output files -- cgit v1.1