2018-07-06 10:47:18 +10:00
|
|
|
prg_install = find_program('install')
|
|
|
|
|
|
|
|
|
|
doxygen = find_program('doxygen', required : false)
|
|
|
|
|
if not doxygen.found()
|
|
|
|
|
error('Program "doxygen" not found or not executable. Try building with -Ddocumentation=false')
|
|
|
|
|
endif
|
|
|
|
|
dot = find_program('dot', required : false)
|
|
|
|
|
if not dot.found()
|
|
|
|
|
error('Program "dot" not found or not executable. Try building with -Ddocumentation=false')
|
|
|
|
|
endif
|
|
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
mainpage = vcs_tag(command : ['git', 'log', '-1', '--format=%h'],
|
2018-07-06 10:47:18 +10:00
|
|
|
fallback : 'unknown',
|
2018-07-10 17:32:35 +10:00
|
|
|
input : 'mainpage.dox',
|
|
|
|
|
output : 'mainpage.dox',
|
2018-07-06 10:47:18 +10:00
|
|
|
replace_string: '__GIT_VERSION__')
|
|
|
|
|
|
|
|
|
|
src_doxygen = files(
|
|
|
|
|
# source files
|
2019-10-07 01:04:21 -06:00
|
|
|
'../../src/libinput.h',
|
2018-07-06 10:47:18 +10:00
|
|
|
# style files
|
|
|
|
|
'style/header.html',
|
|
|
|
|
'style/footer.html',
|
|
|
|
|
'style/customdoxygen.css',
|
|
|
|
|
'style/bootstrap.css',
|
|
|
|
|
'style/libinputdoxygen.css',
|
|
|
|
|
)
|
|
|
|
|
|
2018-08-08 11:18:20 +10:00
|
|
|
doxyfiles = []
|
|
|
|
|
foreach f : src_doxygen
|
|
|
|
|
df = configure_file(input: f,
|
|
|
|
|
output: '@PLAINNAME@',
|
2020-09-09 11:26:25 +10:00
|
|
|
copy : true)
|
2018-08-08 11:18:20 +10:00
|
|
|
doxyfiles += [ df ]
|
|
|
|
|
endforeach
|
2018-07-06 10:47:18 +10:00
|
|
|
|
|
|
|
|
doc_config = configuration_data()
|
|
|
|
|
doc_config.set('PACKAGE_NAME', meson.project_name())
|
|
|
|
|
doc_config.set('PACKAGE_VERSION', meson.project_version())
|
|
|
|
|
doc_config.set('builddir', meson.current_build_dir())
|
|
|
|
|
|
|
|
|
|
doxyfile = configure_file(input : 'libinput.doxygen.in',
|
|
|
|
|
output : 'libinput.doxygen',
|
2019-08-02 22:45:16 +10:00
|
|
|
configuration : doc_config)
|
2018-07-06 10:47:18 +10:00
|
|
|
|
|
|
|
|
custom_target('doxygen',
|
2018-08-08 11:18:20 +10:00
|
|
|
input : [ doxyfiles, doxyfile, mainpage ] + src_doxygen,
|
2020-09-29 17:33:36 +10:00
|
|
|
output : [ 'html' ],
|
2018-07-06 10:47:18 +10:00
|
|
|
command : [ doxygen, doxyfile ],
|
|
|
|
|
install : false,
|
2018-08-08 11:18:20 +10:00
|
|
|
depends: [ mainpage ],
|
2018-07-06 10:47:18 +10:00
|
|
|
build_by_default : true)
|