• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1prg_install = find_program('install')
2
3doxygen = find_program('doxygen', required : false)
4if not doxygen.found()
5	error('Program "doxygen" not found or not executable. Try building with -Ddocumentation=false')
6endif
7dot = find_program('dot', required : false)
8if not dot.found()
9	error('Program "dot" not found or not executable. Try building with -Ddocumentation=false')
10endif
11
12mainpage = vcs_tag(command : ['git', 'log', '-1', '--format=%h'],
13		 fallback : 'unknown',
14		 input : 'mainpage.dox',
15		 output : 'mainpage.dox',
16		 replace_string: '__GIT_VERSION__')
17
18src_doxygen = files(
19	# source files
20	'../../src/libinput.h',
21	# style files
22	'style/header.html',
23	'style/footer.html',
24	'style/customdoxygen.css',
25	'style/bootstrap.css',
26	'style/libinputdoxygen.css',
27)
28
29doxyfiles = []
30foreach f : src_doxygen
31	df = configure_file(input: f,
32			    output: '@PLAINNAME@',
33			    copy : true)
34	doxyfiles += [ df ]
35endforeach
36
37doc_config = configuration_data()
38doc_config.set('PACKAGE_NAME', meson.project_name())
39doc_config.set('PACKAGE_VERSION', meson.project_version())
40doc_config.set('builddir', meson.current_build_dir())
41
42doxyfile = configure_file(input : 'libinput.doxygen.in',
43			  output : 'libinput.doxygen',
44			  configuration : doc_config)
45
46custom_target('doxygen',
47	      input : [ doxyfiles, doxyfile, mainpage ] + src_doxygen,
48	      output : [ 'html' ],
49	      command : [ doxygen, doxyfile ],
50	      install : false,
51	      depends: [ mainpage ],
52	      build_by_default : true)
53