3 if meson.is_cross_build()
4 if get_option('doc').enabled()
5 error('Documentation enabled but building the doc while cross building is not supported yet.')
8 message('Documentation not built as building it while cross building is not supported yet.')
13 if get_option('doc').enabled()
14 error('Documentation enabled but not supported when building statically.')
17 message('Building statically, can\'t build the documentation')
21 required_hotdoc_extensions = ['gst-extension']
22 if gst_dep.type_name() == 'internal'
23 gst_proj = subproject('gstreamer')
24 plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
26 plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
30 plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
31 if plugins_cache_generator.found()
32 gst_plugins_doc_dep = custom_target('libav-plugins-doc-cache',
33 command: [plugins_cache_generator, plugins_cache, '@OUTPUT@', '@INPUT@'],
35 output: 'gst_plugins_cache.json',
36 build_always_stale: true,
39 warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
42 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
43 if not hotdoc_p.found()
44 message('Hotdoc not found, not building the documentation')
48 hotdoc_req = '>= 0.11.0'
49 hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
50 if not hotdoc_version.version_compare(hotdoc_req)
51 if get_option('doc').enabled()
52 error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
54 message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
60 hotdoc = import('hotdoc')
61 docconf = configuration_data()
62 docconf.set('GST_API_VERSION', api_version)
64 foreach extension: required_hotdoc_extensions
65 if not hotdoc.has_extensions(extension)
66 if get_option('doc').enabled()
67 error('Documentation enabled but gi-extension missing')
70 message('@0@ extensions not found, not building documentation requiring it'.format(extension))
77 plugins_doc = [hotdoc.generate_doc('libav',
78 project_version: api_version,
79 sitemap: 'sitemap.txt',
81 gst_index: 'index.md',
82 gst_smart_index: true,
83 gst_c_sources: ['../ext/*/*.[ch]',],
84 gst_cache_file: plugins_cache,
85 gst_plugin_name: 'libav',
86 dependencies: [gst_dep],
87 disable_incremental_build: true,