mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
meson.build: separate options for installing man pages or docs
This commit is contained in:
parent
d0ec322434
commit
ffa52fdbc1
3 changed files with 20 additions and 10 deletions
|
|
@ -209,7 +209,7 @@ html_target = custom_target('pipewire-docs',
|
||||||
output: [ 'html' ],
|
output: [ 'html' ],
|
||||||
command: [ doxygen, doxyfile ],
|
command: [ doxygen, doxyfile ],
|
||||||
env: doxygen_env,
|
env: doxygen_env,
|
||||||
install: true,
|
install: install_docs,
|
||||||
install_tag: 'doc',
|
install_tag: 'doc',
|
||||||
install_dir: docdir)
|
install_dir: docdir)
|
||||||
|
|
||||||
|
|
@ -230,7 +230,7 @@ foreach m : manpages
|
||||||
input : html_target,
|
input : html_target,
|
||||||
depend_files : [ man_fixup ],
|
depend_files : [ man_fixup ],
|
||||||
capture : true,
|
capture : true,
|
||||||
install : true,
|
install : install_man,
|
||||||
install_tag: 'man',
|
install_tag: 'man',
|
||||||
install_dir : get_option('mandir') / 'man' + section
|
install_dir : get_option('mandir') / 'man' + section
|
||||||
)
|
)
|
||||||
|
|
|
||||||
20
meson.build
20
meson.build
|
|
@ -485,18 +485,24 @@ if alsa_dep.found()
|
||||||
subdir('pipewire-alsa/tests')
|
subdir('pipewire-alsa/tests')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
doxygen = find_program('doxygen', required : get_option('docs'))
|
generate_docs = get_option('man').enabled() or get_option('docs').enabled()
|
||||||
pymod = import('python')
|
if get_option('man').allowed() or get_option('docs').allowed()
|
||||||
python = pymod.find_installation('python3', required: get_option('docs'))
|
doxygen = find_program('doxygen', required : generate_docs)
|
||||||
generate_docs = doxygen.found() and python.found()
|
pymod = import('python')
|
||||||
|
python = pymod.find_installation('python3', required: generate_docs)
|
||||||
|
generate_docs = doxygen.found() and python.found()
|
||||||
|
endif
|
||||||
|
|
||||||
|
install_docs = get_option('docs').require(generate_docs).allowed()
|
||||||
|
install_man = get_option('man').require(generate_docs).allowed()
|
||||||
|
|
||||||
|
summary({'Documentation ': install_docs}, bool_yn: true)
|
||||||
|
summary({'Man pages ': install_man}, bool_yn: true)
|
||||||
|
|
||||||
if generate_docs
|
if generate_docs
|
||||||
subdir('doc')
|
subdir('doc')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
summary({'Documentation and man pages ': generate_docs}, bool_yn: true)
|
|
||||||
|
|
||||||
|
|
||||||
setenv = find_program('pw-uninstalled.sh')
|
setenv = find_program('pw-uninstalled.sh')
|
||||||
run_target('pw-uninstalled',
|
run_target('pw-uninstalled',
|
||||||
command : [setenv,
|
command : [setenv,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,11 @@ option('docdir',
|
||||||
type : 'string',
|
type : 'string',
|
||||||
description : 'Directory for installing documentation to (defaults to pipewire_datadir/doc/meson.project_name() )')
|
description : 'Directory for installing documentation to (defaults to pipewire_datadir/doc/meson.project_name() )')
|
||||||
option('docs',
|
option('docs',
|
||||||
description: 'Build documentation',
|
description: 'Documentation',
|
||||||
|
type: 'feature',
|
||||||
|
value: 'disabled')
|
||||||
|
option('man',
|
||||||
|
description: 'Manual pages',
|
||||||
type: 'feature',
|
type: 'feature',
|
||||||
value: 'disabled')
|
value: 'disabled')
|
||||||
option('examples',
|
option('examples',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue