2018-10-22 09:38:30 +00:00
|
|
|
build_hotdoc = false
|
|
|
|
|
2024-11-03 17:30:40 +00:00
|
|
|
if get_option('doc').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2018-10-22 09:38:30 +00:00
|
|
|
if meson.is_cross_build()
|
|
|
|
if get_option('doc').enabled()
|
|
|
|
error('Documentation enabled but building the doc while cross building is not supported yet.')
|
|
|
|
endif
|
|
|
|
|
|
|
|
message('Documentation not built as building it while cross building is not supported yet.')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2021-10-12 18:52:48 +00:00
|
|
|
if static_build
|
|
|
|
if get_option('doc').enabled()
|
|
|
|
error('Documentation enabled but not supported when building statically.')
|
|
|
|
endif
|
|
|
|
|
|
|
|
message('Building statically, can\'t build the documentation')
|
2018-10-22 09:38:30 +00:00
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not build_gir
|
|
|
|
if get_option('doc').enabled()
|
|
|
|
error('Documentation enabled but introspection not built.')
|
|
|
|
endif
|
|
|
|
|
2021-10-12 18:52:48 +00:00
|
|
|
message('Introspection not built, won\'t build documentation requiring it')
|
2018-10-22 09:38:30 +00:00
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2021-10-12 18:52:48 +00:00
|
|
|
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
|
|
|
if not hotdoc_p.found()
|
|
|
|
message('Hotdoc not found, not building the documentation')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
required_hotdoc_extensions = ['gi-extension']
|
2018-10-22 09:38:30 +00:00
|
|
|
hotdoc = import('hotdoc')
|
|
|
|
foreach extension: required_hotdoc_extensions
|
|
|
|
if not hotdoc.has_extensions(extension)
|
|
|
|
if get_option('doc').enabled()
|
|
|
|
error('Documentation enabled but @0@ missing'.format(extension))
|
|
|
|
endif
|
|
|
|
|
|
|
|
message('@0@ extension not found, not building documentation'.format(extension))
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
excludes = ['gettext.h',
|
|
|
|
'gst-validate-internal.h',
|
|
|
|
'gst-validate-i18n-lib.c'
|
|
|
|
]
|
|
|
|
|
|
|
|
build_hotdoc = true
|
|
|
|
validate_excludes = []
|
|
|
|
foreach f: excludes
|
|
|
|
validate_excludes += [join_paths(meson.current_source_dir(), '..',
|
|
|
|
'validate', 'gst', 'validate', f)]
|
|
|
|
endforeach
|
|
|
|
|
2020-06-27 04:37:39 +00:00
|
|
|
validate_sources = gstvalidate_headers + gstvalidate_sources
|
2018-10-22 09:38:30 +00:00
|
|
|
hotdoc = import('hotdoc')
|
|
|
|
plugins_doc = []
|
|
|
|
libs_doc = [hotdoc.generate_doc('gst-devtools',
|
|
|
|
project_version: apiversion,
|
|
|
|
sitemap: 'sitemap.txt',
|
|
|
|
index: 'index.md',
|
|
|
|
gi_c_sources: validate_sources,
|
|
|
|
gi_c_source_filters: validate_excludes,
|
|
|
|
gi_index: 'gi-index.md',
|
|
|
|
gi_smart_index: true,
|
|
|
|
gi_sources: [validate_gir[0].full_path()],
|
|
|
|
disable_incremental_build: true,
|
|
|
|
dependencies : [validate_dep],
|
2023-01-04 20:37:55 +00:00
|
|
|
depends: validate_gir[0],
|
2018-10-22 09:38:30 +00:00
|
|
|
)]
|