Debian Codegraph @

doc/api/meson.build

raw
1 prg_install = find_program('install')
2
3 doxygen = find_program('doxygen', required : false)
4 if not doxygen.found()
5 error('Program "doxygen" not found or not executable. Try building with -Ddocumentation=false')
6 endif
7 dot = find_program('dot', required : false)
8 if not dot.found()
9 error('Program "dot" not found or not executable. Try building with -Ddocumentation=false')
10 endif
11
12 mainpage = 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
18 src_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
29 doxyfiles = []
30 foreach f : src_doxygen
31 df = configure_file(input: f,
32 output: '@PLAINNAME@',
33 copy : true)
34 doxyfiles += [ df ]
35 endforeach
36
37 doc_config = configuration_data()
38 doc_config.set('PACKAGE_NAME', meson.project_name())
39 doc_config.set('PACKAGE_VERSION', meson.project_version())
40 doc_config.set('builddir', meson.current_build_dir())
41
42 doxyfile = configure_file(input : 'libinput.doxygen.in',
43 output : 'libinput.doxygen',
44 configuration : doc_config)
45
46 custom_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)