2017-05-30 19:46:51 +02:00
|
|
|
doxyfile_conf = configuration_data()
|
|
|
|
|
doxyfile_conf.set('PACKAGE_NAME', meson.project_name())
|
|
|
|
|
doxyfile_conf.set('PACKAGE_VERSION', meson.project_version())
|
2021-12-28 16:35:20 +01:00
|
|
|
doxyfile_conf.set('top_srcdir', meson.project_source_root())
|
|
|
|
|
doxyfile_conf.set('top_builddir', meson.project_build_root())
|
2023-01-14 22:02:13 +01:00
|
|
|
doxyfile_conf.set('output_directory', meson.current_build_dir())
|
2017-05-30 19:46:51 +02:00
|
|
|
|
2021-06-29 11:17:03 +03:00
|
|
|
dot_found = find_program('dot', required: false).found()
|
|
|
|
|
summary({'dot (used with doxygen)': dot_found}, bool_yn: true, section: 'Optional programs')
|
|
|
|
|
if dot_found
|
2017-05-30 19:46:51 +02:00
|
|
|
doxyfile_conf.set('HAVE_DOT', 'YES')
|
|
|
|
|
else
|
|
|
|
|
doxyfile_conf.set('HAVE_DOT', 'NO')
|
|
|
|
|
endif
|
|
|
|
|
|
2021-05-25 19:55:06 +10:00
|
|
|
# Note: order here is how doxygen will expose the pages in the sidebar
|
2021-10-02 20:55:53 +03:00
|
|
|
# api-tree.dox should be first to determine ordering of Modules.
|
2021-05-07 09:09:45 +10:00
|
|
|
extra_docs = [
|
2021-10-02 20:55:53 +03:00
|
|
|
'api-tree.dox',
|
2021-05-25 19:55:06 +10:00
|
|
|
'index.dox',
|
2021-07-29 14:29:46 +10:00
|
|
|
'overview.dox',
|
2021-05-25 19:55:06 +10:00
|
|
|
'pipewire.dox',
|
|
|
|
|
'pipewire-design.dox',
|
2021-07-29 14:25:47 +10:00
|
|
|
'pipewire-access.dox',
|
|
|
|
|
'pipewire-midi.dox',
|
|
|
|
|
'pipewire-portal.dox',
|
2021-05-25 19:55:06 +10:00
|
|
|
'pipewire-daemon.dox',
|
|
|
|
|
'pipewire-library.dox',
|
2021-06-24 14:06:30 +10:00
|
|
|
'pipewire-modules.dox',
|
2021-05-25 19:55:06 +10:00
|
|
|
'pipewire-session-manager.dox',
|
|
|
|
|
'pipewire-objects-design.dox',
|
2021-07-29 14:11:34 +10:00
|
|
|
'pipewire-audio.dox',
|
2023-05-15 11:44:41 +02:00
|
|
|
'pipewire-scheduling.dox',
|
2023-05-16 11:21:03 +02:00
|
|
|
'pipewire-protocol.dox',
|
2021-05-25 13:08:04 +10:00
|
|
|
'tutorial.dox',
|
|
|
|
|
'tutorial1.dox',
|
|
|
|
|
'tutorial2.dox',
|
|
|
|
|
'tutorial3.dox',
|
|
|
|
|
'tutorial4.dox',
|
|
|
|
|
'tutorial5.dox',
|
|
|
|
|
'tutorial6.dox',
|
2021-10-02 20:55:53 +03:00
|
|
|
'api.dox',
|
2021-05-25 13:37:47 +10:00
|
|
|
'spa-index.dox',
|
2021-06-24 10:49:22 +10:00
|
|
|
'spa-plugins.dox',
|
2021-05-25 13:37:47 +10:00
|
|
|
'spa-design.dox',
|
|
|
|
|
'spa-pod.dox',
|
|
|
|
|
'spa-buffer.dox',
|
2021-05-25 19:55:06 +10:00
|
|
|
'pulseaudio.dox',
|
2021-07-29 15:25:06 +02:00
|
|
|
'dma-buf.dox',
|
2021-05-07 09:09:45 +10:00
|
|
|
]
|
|
|
|
|
|
2021-10-02 20:55:53 +03:00
|
|
|
inputs = []
|
2021-05-07 09:09:45 +10:00
|
|
|
foreach extra : extra_docs
|
2021-12-28 16:35:20 +01:00
|
|
|
inputs += meson.project_source_root() / 'doc' / extra
|
2021-05-07 09:09:45 +10:00
|
|
|
endforeach
|
2021-10-02 20:55:53 +03:00
|
|
|
foreach h : pipewire_headers
|
2021-12-28 16:35:20 +01:00
|
|
|
inputs += meson.project_source_root() / 'src' / 'pipewire' / h
|
2021-10-02 20:55:53 +03:00
|
|
|
endforeach
|
|
|
|
|
foreach h : pipewire_ext_headers
|
2021-12-28 16:35:20 +01:00
|
|
|
inputs += meson.project_source_root() / 'src' / 'pipewire' / 'extensions' / h
|
2021-10-02 20:55:53 +03:00
|
|
|
endforeach
|
|
|
|
|
foreach h : pipewire_ext_sm_headers
|
2021-12-28 16:35:20 +01:00
|
|
|
inputs += meson.project_source_root() / 'src' / 'pipewire' / 'extensions' / h
|
2021-10-02 20:55:53 +03:00
|
|
|
endforeach
|
|
|
|
|
foreach h : pipewire_sources
|
2021-12-28 16:35:20 +01:00
|
|
|
inputs += meson.project_source_root() / 'src' / 'pipewire' / h
|
2021-10-02 20:55:53 +03:00
|
|
|
endforeach
|
|
|
|
|
foreach h : module_sources
|
2021-12-28 16:35:20 +01:00
|
|
|
inputs += meson.project_source_root() / 'src' / 'modules' / h
|
2021-10-02 20:55:53 +03:00
|
|
|
endforeach
|
2021-12-28 16:35:20 +01:00
|
|
|
inputs += meson.project_source_root() / 'test' / 'pwtest.h'
|
|
|
|
|
input_dirs = [ meson.project_source_root() / 'spa' / 'include' / 'spa' ]
|
2021-10-02 20:55:53 +03:00
|
|
|
|
|
|
|
|
path_prefixes = [
|
2021-12-28 16:35:20 +01:00
|
|
|
meson.project_source_root() / 'src',
|
|
|
|
|
meson.project_source_root() / 'spa' / 'include',
|
|
|
|
|
meson.project_source_root(),
|
2021-10-02 20:55:53 +03:00
|
|
|
]
|
2021-05-07 09:09:45 +10:00
|
|
|
|
2021-05-21 14:53:48 +10:00
|
|
|
cssfiles = [
|
2021-12-28 16:35:20 +01:00
|
|
|
meson.project_source_root() / 'doc' / 'doxygen-awesome.css',
|
|
|
|
|
meson.project_source_root() / 'doc' / 'custom.css'
|
2021-05-21 14:53:48 +10:00
|
|
|
]
|
|
|
|
|
|
2021-10-09 23:25:29 +03:00
|
|
|
# Example files (in order from simple to esoteric)
|
|
|
|
|
example_files = [
|
2021-10-10 00:09:32 +03:00
|
|
|
'tutorial1.c',
|
|
|
|
|
'tutorial2.c',
|
|
|
|
|
'tutorial3.c',
|
|
|
|
|
'tutorial4.c',
|
|
|
|
|
'tutorial5.c',
|
|
|
|
|
'tutorial6.c',
|
2021-10-09 23:25:29 +03:00
|
|
|
]
|
2021-10-31 14:17:58 +02:00
|
|
|
foreach h : examples
|
|
|
|
|
example_files += [h + '.c']
|
|
|
|
|
endforeach
|
|
|
|
|
foreach h : spa_examples
|
|
|
|
|
example_files += ['spa/examples/' + h + '.c']
|
|
|
|
|
endforeach
|
2021-10-09 23:25:29 +03:00
|
|
|
|
|
|
|
|
example_doxygen = []
|
|
|
|
|
example_ref = []
|
|
|
|
|
foreach h : example_files
|
|
|
|
|
example_doxygen += ['\\example ' + h,
|
|
|
|
|
'\\snippet{doc} ' + h + ' title',
|
|
|
|
|
'<br>',
|
|
|
|
|
'\\snippet{doc} ' + h + ' doc']
|
|
|
|
|
example_ref += ['- \\ref ' + h + ' "": \snippet{doc} ' + h + ' title']
|
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
examples_dox_conf = configuration_data()
|
|
|
|
|
examples_dox_conf.set('example_doxygen', '\n'.join(example_doxygen))
|
|
|
|
|
examples_dox_conf.set('example_ref', '\n'.join(example_ref))
|
|
|
|
|
examples_dox = configure_file(input: 'examples.dox.in',
|
|
|
|
|
output: 'examples.dox',
|
|
|
|
|
configuration: examples_dox_conf)
|
|
|
|
|
|
|
|
|
|
input_dirs += [ 'doc/examples.dox' ]
|
|
|
|
|
|
2022-01-20 21:06:54 +02:00
|
|
|
man_doxygen = []
|
|
|
|
|
man_subpages = []
|
|
|
|
|
foreach m : manpages
|
|
|
|
|
manconf = configuration_data()
|
|
|
|
|
pagename = 'page_man_' + m.split('.rst.in').get(0).replace('.', '_').replace('-', '_')
|
|
|
|
|
filename = m.split('.rst.in').get(0) + '.dox'
|
|
|
|
|
manconf.set('pagename', pagename)
|
|
|
|
|
manconf.set('title', m.split('.rst.in').get(0).replace('.1','').replace('.5',''))
|
|
|
|
|
manconf.set('filename', meson.project_source_root() / 'man' / m)
|
|
|
|
|
manfile = configure_file(input: 'manpage.dox.in',
|
|
|
|
|
output: filename,
|
|
|
|
|
configuration: manconf)
|
|
|
|
|
man_doxygen += [manfile]
|
|
|
|
|
man_subpages += ['- \subpage ' + pagename]
|
|
|
|
|
input_dirs += [ 'doc/' + filename ]
|
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
pw_tools_dox_conf = configuration_data()
|
|
|
|
|
pw_tools_dox_conf.set('man_subpages', '\n'.join(man_subpages))
|
|
|
|
|
pw_tools_dox = configure_file(input: 'pipewire-tools.dox.in',
|
|
|
|
|
output: 'pipewire-tools.dox',
|
|
|
|
|
configuration: pw_tools_dox_conf)
|
|
|
|
|
input_dirs += [ 'doc/pipewire-tools.dox' ]
|
|
|
|
|
|
2023-11-04 11:26:27 +02:00
|
|
|
doxygen_layout = meson.project_source_root() / 'doc' / 'DoxygenLayout.xml'
|
|
|
|
|
|
2021-10-04 22:14:38 +03:00
|
|
|
doxyfile_conf.set('inputs', ' '.join(inputs + input_dirs))
|
2021-05-21 14:53:48 +10:00
|
|
|
doxyfile_conf.set('cssfiles', ' '.join(cssfiles))
|
2023-11-04 11:26:27 +02:00
|
|
|
doxyfile_conf.set('layout', doxygen_layout)
|
2021-10-02 19:24:17 +03:00
|
|
|
doxyfile_conf.set('path_prefixes', ' '.join(path_prefixes))
|
2021-12-28 16:35:20 +01:00
|
|
|
doxyfile_conf.set('c_input_filter', meson.project_source_root() / 'doc' / 'input-filter.sh')
|
|
|
|
|
doxyfile_conf.set('h_input_filter', meson.project_source_root() / 'doc' / 'input-filter-h.sh')
|
2017-09-05 13:35:25 +02:00
|
|
|
|
2017-05-30 19:46:51 +02:00
|
|
|
doxyfile = configure_file(input: 'Doxyfile.in',
|
|
|
|
|
output: 'Doxyfile',
|
2020-05-19 16:49:38 +02:00
|
|
|
configuration: doxyfile_conf)
|
2017-05-30 19:46:51 +02:00
|
|
|
|
2021-04-15 21:45:53 +03:00
|
|
|
docdir = get_option('docdir')
|
|
|
|
|
if docdir == ''
|
|
|
|
|
docdir = pipewire_datadir / 'doc' / meson.project_name()
|
|
|
|
|
endif
|
2017-05-30 19:46:51 +02:00
|
|
|
|
|
|
|
|
html_target = custom_target('pipewire-docs',
|
2023-11-04 11:26:27 +02:00
|
|
|
input: [ doxyfile, doxygen_layout, examples_dox, pw_tools_dox ] + inputs + cssfiles + man_doxygen,
|
2017-05-30 19:46:51 +02:00
|
|
|
output: [ 'html' ],
|
|
|
|
|
command: [ doxygen, doxyfile ],
|
|
|
|
|
install: true,
|
2021-04-15 21:45:53 +03:00
|
|
|
install_dir: docdir)
|