meson: make docdir configurable

The debian package wants to install docs to $datadir/doc/i3-wm.

related to #4086
This commit is contained in:
Michael Stapelberg
2020-05-19 18:24:38 +02:00
parent aba6ec3e52
commit 693eee0c03
3 changed files with 12 additions and 4 deletions

View File

@ -71,6 +71,11 @@ config_h = declare_dependency(
# docs generation
################################################################################
docdir = get_option('docdir')
if docdir == ''
docdir = join_paths(get_option('datadir'), 'doc', 'i3')
endif
if get_option('docs')
asciidoc = find_program('asciidoc')
doc_toc_inputs = [
@ -96,7 +101,7 @@ if get_option('docs')
'@INPUT@',
],
install: true,
install_dir: join_paths(get_option('datadir'), 'doc', 'i3'),
install_dir: docdir,
)
endforeach
@ -115,7 +120,7 @@ if get_option('docs')
'@INPUT@',
],
install: true,
install_dir: join_paths(get_option('datadir'), 'doc', 'i3'),
install_dir: docdir,
)
endforeach
endif