Add install_data() rename documentation

pull/3223/head
Aleksey Filippov 7 years ago
parent 6994ec56e6
commit d63fff06d9
  1. 13
      docs/markdown/Installing.md
  2. 7
      docs/markdown/Reference-manual.md

@ -29,6 +29,19 @@ install_man('foo.1') # -> share/man/man1/foo.1.gz
install_data('datafile.dat', install_dir : join_paths(get_option('datadir'), 'progname')) # -> share/progname/datafile.dat
```
`install_data()` supports rename of the file *since 0.46.0*.
```meson
# file.txt -> {datadir}/{projectname}/new-name.txt
install_data('file.txt', rename : 'new-name.txt')
# file1.txt -> share/myapp/dir1/data.txt
# file2.txt -> share/myapp/dir2/data.txt
install_data(['file1.txt', 'file2.txt'],
rename : ['dir1/data.txt', 'dir2/data.txt'],
install_dir : 'share/myapp')
```
Sometimes you want to copy an entire subtree directly. For this use case there is the `install_subdir` command, which can be used like this.
```meson

@ -737,6 +737,13 @@ arguments. The following keyword arguments are supported:
To leave any of these three as the default, specify `false`.
- `rename` if specified renames each source file into corresponding file
from `rename` list. Nested paths are allowed and they are joined with
`install_dir`. Length of `rename` list must be equal to the number of sources.
*(added 0.46.0)*
See [Installing](Installing.md) for more examples.
### install_headers()
``` meson

Loading…
Cancel
Save