doc/meson.build: convert option "documentation" to Meson "feature"
This allows automatic optional detection of Sphinx. This will be useful when we start building the manpages with Sphinx, which many users may want to have.
This commit is contained in:
parent
2bcd8516ea
commit
2e73e605f7
|
@ -1,6 +1,10 @@
|
|||
install_man(['mpd.1', 'mpd.conf.5'])
|
||||
|
||||
sphinx = find_program('sphinx-build')
|
||||
sphinx = find_program('sphinx-build', required: get_option('documentation'))
|
||||
if not sphinx.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
sphinx_output = custom_target(
|
||||
'HTML documentation',
|
||||
output: 'html',
|
||||
|
|
|
@ -543,9 +543,7 @@ install_data(
|
|||
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
|
||||
)
|
||||
|
||||
if get_option('documentation')
|
||||
subdir('doc')
|
||||
endif
|
||||
subdir('doc')
|
||||
|
||||
if get_option('test')
|
||||
subdir('test')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
option('documentation', type: 'boolean', value: false, description: 'Build documentation')
|
||||
option('documentation', type: 'feature', description: 'Build documentation')
|
||||
|
||||
option('test', type: 'boolean', value: false, description: 'Build the unit tests and debug programs')
|
||||
|
||||
|
|
Loading…
Reference in New Issue