uridecodebin3: Always store pending buffering messages
[platform/upstream/gstreamer.git] / subprojects / gstreamer-vaapi / docs / meson.build
1 build_hotdoc = false
2
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.')
6     endif
7
8     message('Documentation not built as building it while cross building is not supported yet.')
9     subdir_done()
10 endif
11
12 if static_build
13     if get_option('doc').enabled()
14         error('Documentation enabled but not supported when building statically.')
15     endif
16
17     message('Building statically, can\'t build the documentation')
18     subdir_done()
19 endif
20
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')
25 else
26     plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
27         required: false)
28 endif
29
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@'],
34         input: plugins,
35         output: 'gst_plugins_cache.json',
36         build_always_stale: true,
37     )
38 else
39     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
40 endif
41
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')
45     subdir_done()
46 endif
47
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))
53     else
54         message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
55         subdir_done()
56     endif
57 endif
58
59 build_hotdoc = true
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')
64     endif
65
66     message('@0@ extensions not found, not building documentation'.format(required_hotdoc_extensions))
67     subdir_done()
68 endif
69
70 message('Plugins: @0@'.format(plugins))
71 libs_doc = []
72 plugins_doc = [hotdoc.generate_doc('vaapi',
73     project_version: api_version,
74     sitemap: 'sitemap.txt',
75     index: 'index.md',
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,
83 )]