xref: /aosp_15_r20/external/wayland/doc/meson.build (revision 84e872a0dc482bffdb63672969dd03a827d67c73)
1if not get_option('libraries')
2	error('-Ddocumentation=true requires -Dlibraries=true')
3endif
4
5dot = find_program('dot')
6doxygen = find_program('doxygen')
7xsltproc = find_program('xsltproc')
8xmlto = find_program('xmlto')
9
10cmd = run_command(doxygen, '--version', check: true)
11message('doxygen: ' + cmd.stdout().strip())
12vers = cmd.stdout().strip()
13if vers.version_compare('< 1.6.0')
14	error('Doxygen 1.6 or later is required for building documentation, found @0@.'.format(vers))
15endif
16
17cmd = run_command(dot, '-V', check: true)
18message('dot: ' + cmd.stderr().strip())
19vers = cmd.stderr().split('version')[1].strip().split(' ')[0]
20if vers.version_compare('< 2.26.0')
21	error('Dot (Graphviz) 2.26 or later is required for building documentation, found @0@.'.format(vers))
22endif
23
24manpage_xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
25cmd = run_command(xsltproc, '--nonet', manpage_xsl, check: false)
26if cmd.returncode() != 0
27	error('The style sheet for man pages providing "@0@" was not found.'.format(manpage_xsl))
28endif
29
30publican_install_prefix = join_paths(
31	get_option('prefix'),
32	get_option('datadir'),
33	'doc',
34	meson.project_name(),
35	'Wayland', 'en-US'
36)
37
38publican_html_dir = 'html'
39
40subdir('doxygen')
41subdir('publican')
42