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.')
12 required_hotdoc_extensions = ['gst-extension']
13 if gst_dep.type_name() == 'internal'
14 gst_proj = subproject('gstreamer')
15 plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
17 plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'))
20 plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
21 if plugins_cache_generator.found()
22 plugins_doc_dep = custom_target('libav-plugins-doc-cache',
23 build_by_default: true,
24 command: [plugins_cache_generator, plugins_cache, '@OUTPUT@', '@INPUT@'],
26 output: 'gst_plugins_cache.json',
29 warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
32 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
33 if not hotdoc_p.found()
34 message('Hotdoc not found, not building the documentation')
39 hotdoc = import('hotdoc')
40 docconf = configuration_data()
41 docconf.set('GST_API_VERSION', api_version)
43 foreach extension: required_hotdoc_extensions
44 if not hotdoc.has_extensions(extension)
45 if get_option('doc').enabled()
46 error('Documentation enabled but gi-extension missing')
49 message('@0@ extensions not found, not building documentation requiring it'.format(extension))
56 plugins_doc = [hotdoc.generate_doc('libav',
57 project_version: api_version,
58 sitemap: 'sitemap.txt',
60 gst_index: 'index.md',
61 gst_smart_index: true,
62 gst_c_sources: ['../ext/*/*.[ch]',],
63 gst_cache_file: plugins_cache,
64 gst_plugin_name: 'libav',
65 dependencies: [gst_dep, gstlibav_plugin, plugins_doc_dep],
66 disable_incremental_build: true,