| 
									
										
										
										
											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())
 | 
					
						
							|  |  |  | doxyfile_conf.set('top_srcdir', meson.source_root())
 | 
					
						
							|  |  |  | doxyfile_conf.set('top_builddir', meson.build_root())
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if find_program('dot', required: false).found()
 | 
					
						
							|  |  |  |   doxyfile_conf.set('HAVE_DOT', 'YES')
 | 
					
						
							|  |  |  | else
 | 
					
						
							|  |  |  |   doxyfile_conf.set('HAVE_DOT', 'NO')
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-07 08:53:51 +10:00
										 |  |  | inputs = []
 | 
					
						
							| 
									
										
										
										
											2017-09-05 13:35:25 +02:00
										 |  |  | foreach h : pipewire_headers
 | 
					
						
							| 
									
										
										
										
											2021-05-07 08:53:51 +10:00
										 |  |  |   inputs += meson.source_root() / 'src' / 'pipewire' / h
 | 
					
						
							| 
									
										
										
										
											2017-09-05 13:35:25 +02:00
										 |  |  | endforeach
 | 
					
						
							|  |  |  | foreach h : pipewire_sources
 | 
					
						
							| 
									
										
										
										
											2021-05-07 08:53:51 +10:00
										 |  |  |   inputs += meson.source_root() / 'src' / 'pipewire' / h
 | 
					
						
							| 
									
										
										
										
											2017-09-05 13:35:25 +02:00
										 |  |  | endforeach
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-21 13:53:19 +10:00
										 |  |  | # SPA headers use static inline functions. Doxygen doesn't extract those
 | 
					
						
							|  |  |  | # unless we have EXTRACT_STATIC set - but we don't want it to extract
 | 
					
						
							|  |  |  | # everything in the rest of the tree.
 | 
					
						
							|  |  |  | # The shell script here basically does a:
 | 
					
						
							|  |  |  | #   cp spa/* builddir/spa/ && sed -i 's/^static//' buildir/spa/**.h
 | 
					
						
							|  |  |  | # The copied files are passed to doxygen as input and they are parsed as
 | 
					
						
							|  |  |  | # normal functions.
 | 
					
						
							|  |  |  | # Because this uses globbing, this target won't rebuild if the headers
 | 
					
						
							|  |  |  | # change but meh.
 | 
					
						
							|  |  |  | spa_header_dirs = []
 | 
					
						
							|  |  |  | sed = find_program('sed', required: false)
 | 
					
						
							|  |  |  | if sed.found()
 | 
					
						
							|  |  |  |   spa_srcdir = meson.source_root() / 'spa' / 'include' / 'spa'
 | 
					
						
							|  |  |  |   spa_dstdir = meson.current_build_dir() / 'spa'
 | 
					
						
							|  |  |  |   spa_strip_static = custom_target(
 | 
					
						
							|  |  |  |     'spa-strip-static',
 | 
					
						
							|  |  |  |     command: [ find_program('strip-static.sh'), spa_srcdir, spa_dstdir ],
 | 
					
						
							|  |  |  |     build_by_default: true,
 | 
					
						
							|  |  |  |     output: 'spa',
 | 
					
						
							|  |  |  |   )
 | 
					
						
							|  |  |  |   spa_header_dirs += spa_dstdir
 | 
					
						
							|  |  |  | else
 | 
					
						
							|  |  |  |   spa_strip_static = []
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-07 09:09:45 +10:00
										 |  |  | extra_docs = [
 | 
					
						
							| 
									
										
										
										
											2021-05-25 11:21:18 +10:00
										 |  |  |   'pipewire-overview.md',
 | 
					
						
							|  |  |  |   'pipewire-design.md',
 | 
					
						
							|  |  |  |   'pipewire-architecture.md',
 | 
					
						
							|  |  |  |   'pipewire-objects-design.md',
 | 
					
						
							| 
									
										
										
										
											2021-05-25 13:08:04 +10:00
										 |  |  |   'tutorial.dox',
 | 
					
						
							|  |  |  |   'tutorial1.dox',
 | 
					
						
							|  |  |  |   'tutorial2.dox',
 | 
					
						
							|  |  |  |   'tutorial3.dox',
 | 
					
						
							|  |  |  |   'tutorial4.dox',
 | 
					
						
							|  |  |  |   'tutorial5.dox',
 | 
					
						
							|  |  |  |   'tutorial6.dox',
 | 
					
						
							| 
									
										
										
										
											2021-05-25 11:19:17 +10:00
										 |  |  |   'spa-index.md',
 | 
					
						
							|  |  |  |   'spa-design.md',
 | 
					
						
							|  |  |  |   'spa-pod.md',
 | 
					
						
							|  |  |  |   'spa-buffer.md',
 | 
					
						
							| 
									
										
										
										
											2021-05-07 09:09:45 +10:00
										 |  |  |   'pulseaudio.md',
 | 
					
						
							|  |  |  | ]
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | foreach extra : extra_docs
 | 
					
						
							|  |  |  |   inputs += meson.source_root() / 'doc' / extra
 | 
					
						
							|  |  |  | endforeach
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-21 14:53:48 +10:00
										 |  |  | cssfiles = [
 | 
					
						
							|  |  |  |   meson.source_root() / 'doc' / 'doxygen-awesome.css',
 | 
					
						
							|  |  |  |   meson.source_root() / 'doc' / 'custom.css'
 | 
					
						
							|  |  |  | ]
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-21 13:53:19 +10:00
										 |  |  | doxyfile_conf.set('inputs', ' '.join(inputs + [spa_dstdir]))
 | 
					
						
							| 
									
										
										
										
											2021-05-21 14:53:48 +10:00
										 |  |  | doxyfile_conf.set('cssfiles', ' '.join(cssfiles))
 | 
					
						
							| 
									
										
										
										
											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',
 | 
					
						
							| 
									
										
										
										
											2021-05-21 14:53:48 +10:00
										 |  |  |                             input: [ doxyfile ] + inputs + cssfiles,
 | 
					
						
							| 
									
										
										
										
											2017-05-30 19:46:51 +02:00
										 |  |  |                             output: [ 'html' ],
 | 
					
						
							|  |  |  |                             command: [ doxygen, doxyfile ],
 | 
					
						
							| 
									
										
										
										
											2021-05-21 13:53:19 +10:00
										 |  |  |                             depends: spa_strip_static,
 | 
					
						
							| 
									
										
										
										
											2017-05-30 19:46:51 +02:00
										 |  |  |                             install: true,
 | 
					
						
							| 
									
										
										
										
											2021-04-15 21:45:53 +03:00
										 |  |  |                             install_dir: docdir)
 |