Make building the docs optional

Fixes #29

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2018-10-29 04:12:09 +00:00
parent 50e2259404
commit 06d879251b
2 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,5 @@
mans = ['compton.1', 'compton-trans.1']
if get_option('build_docs')
a2x = find_program('a2x')
foreach m : mans
custom_target(m, output: [m], input: [m+'.asciidoc'],
@ -6,3 +7,4 @@ foreach m : mans
'-D', meson.current_build_dir()],
install: true, install_dir: 'share/man/man1/')
endforeach
endif

View File

@ -9,3 +9,5 @@ option('opengl', type: 'boolean', value: true, description: 'Enable features tha
option('dbus', type: 'boolean', value: true, description: 'Enable suport for D-Bus remote control')
option('xrescheck', type: 'boolean', value: false, description: 'Enable X resource leak checker (for debug only)')
option('build_docs', type: 'boolean', value: false, description: 'Build documentation and man pages')