| 1 |
project('data install test', |
| 2 |
default_options : ['install_umask=preserve']) |
| 3 |
install_data(sources : 'datafile.dat', install_dir : 'share/progname') |
| 4 |
# Some file in /etc that is only read-write by root; add a sticky bit for testing |
| 5 |
install_data(sources : 'etcfile.dat', install_dir : '/etc', install_mode : 'rw------T') |
| 6 |
# Some script that needs to be executable by the group |
| 7 |
install_data('runscript.sh', |
| 8 |
install_dir : get_option('bindir'), |
| 9 |
install_mode : ['rwxr-sr-x', 'root', 0]) |
| 10 |
install_data(files('fileobject_datafile.dat'), |
| 11 |
install_dir : 'share/progname', |
| 12 |
install_mode : [false, false, 0]) |
| 13 |
|
| 14 |
install_data(files('somefile.txt')) |
| 15 |
|
| 16 |
subdir('vanishing') |
| 17 |
|
| 18 |
install_data(sources : 'vanishing/vanishing2.dat', install_dir : 'share/progname') |
| 19 |
|
| 20 |
install_data(sources : 'to_be_renamed_1.txt', rename : 'renamed file.txt') |
| 21 |
install_data(sources : ['vanishing/to_be_renamed_2.txt', 'to_be_renamed_3.txt'], |
| 22 |
install_dir : 'share/renamed', |
| 23 |
rename : ['renamed 2.txt', 'renamed 3.txt']) |
| 24 |
install_data(sources : 'to_be_renamed_4.txt', rename : 'some/nested/path.txt') |
| 25 |
|
| 26 |
install_data('subdir/data.txt', preserve_path : true) |
| 27 |
|
| 28 |
subproject('moredata') |