From 7c686208a18f93ec1f955c289045251af5ef6056 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 24 Jul 2021 13:09:25 +0200 Subject: meson: add -Ddocs=disabled|enabled|auto command line option When enabled (the default, if scdoc is found), we build and install the man pages, example foot.ini, readme, changelog and license files. --- meson.build | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 09d86ff7..4d0b8f13 100644 --- a/meson.build +++ b/meson.build @@ -238,20 +238,25 @@ else terminfo_install_location = 'disabled' endif -install_data( - 'LICENSE', 'README.md', 'CHANGELOG.md', - install_dir: join_paths(get_option('datadir'), 'doc', 'foot')) install_data( 'foot.desktop', 'foot-server.desktop', install_dir: join_paths(get_option('datadir'), 'applications')) -install_data('foot.ini', install_dir: join_paths(get_option('datadir'), 'foot')) + +scdoc = dependency('scdoc', native: true, required: get_option('docs')) +if scdoc.found() + install_data( + 'LICENSE', 'README.md', 'CHANGELOG.md', + install_dir: join_paths(get_option('datadir'), 'doc', 'foot')) + install_data('foot.ini', install_dir: join_paths(get_option('datadir'), 'foot')) + subdir('doc') +endif subdir('completions') -subdir('doc') subdir('icons') summary( { + 'Documentation': scdoc.found(), 'IME': get_option('ime'), 'Grapheme clustering': utf8proc.found(), 'Terminfo': tic.found(), -- cgit v1.3