meson.build: make pandoc optional

Skip only pandoc-requiring parts if it is not available.
This commit is contained in:
Pauli Virtanen 2023-11-21 18:04:48 +02:00 committed by Wim Taymans
parent f4a56ad45d
commit c29d4d4ab7
3 changed files with 12 additions and 5 deletions

View file

@ -172,7 +172,7 @@ html_target = custom_target('pipewire-docs',
install_dir: docdir)
if generate_module_manpages
if generate_extra_manpages
module_man_rst_py = meson.project_source_root() / 'doc' / 'module-man-rst.py'
module_man_defines = []
foreach m : manpage_conf.keys()

View file

@ -502,17 +502,20 @@ subdir('man')
doxygen = find_program('doxygen', required : get_option('docs'))
pymod = import('python')
python = pymod.find_installation('python3', required: get_option('docs'))
generate_extra_manpages = false
if doxygen.found() and python.found()
generate_module_manpages = get_option('docs').enabled() and get_option('man').enabled()
if generate_manpages
pandoc = find_program('pandoc', required: generate_module_manpages)
generate_module_manpages = pandoc.found()
pandoc = find_program('pandoc', required: get_option('man-extra'))
generate_extra_manpages = pandoc.found()
endif
summary({'Module manpage generation': generate_module_manpages}, bool_yn: true)
subdir('doc')
endif
summary({'Extra manpage generation': generate_extra_manpages}, bool_yn: true)
setenv = find_program('pw-uninstalled.sh')
run_target('pw-uninstalled',
command : [setenv,

View file

@ -13,6 +13,10 @@ option('man',
description: 'Build manpages',
type: 'feature',
value: 'auto')
option('man-extra',
description: 'Build extra manpages',
type: 'feature',
value: 'auto')
option('tests',
description: 'Build tests',
type: 'feature',