The Meson build system Wiki
Brought to you by:
jussip
The new home of Meson's documentation is here. The information below is preserved only for posterity. It should be considered out of date.
By default Meson will not install anything. Build targets can be installed by tagging them as installable in the definition.
project('install', 'c') shared_library('mylib', 'libfile.c', install : true)
There is usually no need to specify install paths or the like. Meson will automatically install it to the standards-conforming location. In this particular case the executable is installed to the bin subdirectory of the install prefix. However if you wish to override the install dir, you can do that with the install_dir argument.
executable('prog', 'prog.c', install : true, install_dir : 'my/special/dir')
Other install commands are the following.
headers('header.h', subdir : 'projname') # -> include/projname/header.h man('foo.1') # -> share/man/man1/foo.1.gz data('progname', sources : 'datafile.cat') # -> share/progname/datafile.dat