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 = ['gi-extension', '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('vaapi-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 if not hotdoc.has_extensions(required_hotdoc_extensions)
62 if get_option('doc').enabled()
63 error('Documentation enabled but gi-extension missing')
66 message('@0@ extensions not found, not building documentation'.format(required_hotdoc_extensions))
70 message('Plugins: @0@'.format(plugins))
72 plugins_doc = [hotdoc.generate_doc('vaapi',
73 project_version: api_version,
74 sitemap: 'sitemap.txt',
76 gst_index: 'index.md',
77 gst_smart_index: true,
78 gst_c_sources: ['../gst/*/*.[ch]',],
79 gst_cache_file: plugins_cache,
80 gst_plugin_name: 'vaapi',
81 dependencies: [gstbase_dep, gstvideo_dep, gstallocators_dep, gstpbutils_dep,
82 libva_dep, gstlibvaapi_dep, gstgl_dep, libm] + plugins,