2023-03-07 13:44:33 +10:00
|
|
|
if 'api' not in get_option('documentation')
|
2023-03-07 13:10:37 +10:00
|
|
|
subdir_done()
|
|
|
|
|
endif
|
|
|
|
|
|
2025-11-06 09:09:17 +10:00
|
|
|
doxygen = find_program('doxygen', required: false)
|
2023-03-07 13:10:37 +10:00
|
|
|
if not doxygen.found()
|
2025-11-06 09:09:17 +10:00
|
|
|
error('Program "doxygen" not found or not executable. Try building with -Ddocumentation=false')
|
2023-03-07 13:10:37 +10:00
|
|
|
endif
|
|
|
|
|
|
2025-11-06 09:09:17 +10:00
|
|
|
mainpage = vcs_tag(command: ['git', 'log', '-1', '--format=%h'],
|
|
|
|
|
fallback: 'unknown',
|
|
|
|
|
input: 'mainpage.dox',
|
|
|
|
|
output: 'mainpage.dox',
|
|
|
|
|
replace_string: '__GIT_VERSION__',
|
|
|
|
|
)
|
2023-03-07 13:10:37 +10:00
|
|
|
|
|
|
|
|
src_doxygen = files(
|
2025-11-06 09:09:17 +10:00
|
|
|
# style files
|
|
|
|
|
'doxygen-awesome.css',
|
2023-03-07 13:10:37 +10:00
|
|
|
) + [libei_headers, libeis_headers, liboeffis_headers]
|
|
|
|
|
|
|
|
|
|
doxyfiles = []
|
2025-11-06 09:09:17 +10:00
|
|
|
foreach f: src_doxygen
|
|
|
|
|
df = configure_file(input: f,
|
|
|
|
|
output: '@PLAINNAME@',
|
|
|
|
|
copy: true,
|
|
|
|
|
)
|
|
|
|
|
doxyfiles += [df]
|
2023-03-07 13:10:37 +10:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
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())
|
|
|
|
|
|
2025-11-06 09:09:17 +10:00
|
|
|
doxyfile = configure_file(input: 'libei.doxygen.in',
|
|
|
|
|
output: 'libei.doxygen',
|
|
|
|
|
configuration: doc_config,
|
|
|
|
|
)
|
2023-03-07 13:10:37 +10:00
|
|
|
|
|
|
|
|
custom_target('doxygen',
|
2025-11-06 09:09:17 +10:00
|
|
|
input: [ doxyfile, mainpage ] + src_doxygen + doxyfiles,
|
|
|
|
|
output: [ 'doc' ],
|
|
|
|
|
command: [ doxygen, doxyfile ],
|
|
|
|
|
install: false,
|
|
|
|
|
depends: [ mainpage ],
|
|
|
|
|
build_by_default: true,
|
|
|
|
|
)
|