subprojects: switch libsoup to a file wrap
[platform/upstream/gstreamer.git] / subprojects / gst-omx / 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 the docmentation while cross building is not supported yet.')
9     subdir_done()
10 endif
11
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')
16 else
17     required_hotdoc_extensions += ['gst-extension']
18     plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
19         required: false)
20 endif
21
22 plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
23 if plugins_cache_generator.found()
24     gst_plugins_doc_dep = custom_target('omx-plugins-doc-cache',
25         command: [plugins_cache_generator, plugins_cache, '@OUTPUT@', '@INPUT@'],
26         input: plugins,
27         output: 'gst_plugins_cache.json',
28     )
29 else
30     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
31 endif
32
33 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
34 if not hotdoc_p.found()
35     message('Hotdoc not found, not building the documentation')
36     subdir_done()
37 endif
38
39 build_hotdoc = true
40 hotdoc = import('hotdoc')
41 if not hotdoc.has_extensions(required_hotdoc_extensions)
42     if get_option('doc').enabled()
43         error('Documentation enabled but gi-extension missing')
44     endif
45
46     message('@0@ extensions not found, not building documentation'.format(required_hotdoc_extensions))
47     subdir_done()
48 endif
49
50 message('Plugins: @0@'.format(plugins))
51 libs_doc = []
52 plugins_doc = [hotdoc.generate_doc('omx',
53     project_version: api_version,
54     sitemap: 'sitemap.txt',
55     index: 'index.md',
56     gst_index: 'index.md',
57     gst_smart_index: true,
58     gst_c_sources: ['../gst/*/*.[ch]',],
59     gst_cache_file: plugins_cache,
60     gst_plugin_name: 'omx',
61     dependencies: [gstomx],
62 )]