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 = ['gi-extension', '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-' + apiversion, 'gst-plugins-doc-cache-generator'))
20 plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
22 if plugins_cache_generator.found()
23 plugins_doc_dep = custom_target('editing-services-doc-cache',
24 build_by_default: true,
25 command: [plugins_cache_generator, plugins_cache, '@OUTPUT@', '@INPUT@'],
27 output: 'gst_plugins_cache.json',
30 warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
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')
39 hotdoc = import('hotdoc')
40 foreach extension: required_hotdoc_extensions
41 if not hotdoc.has_extensions(extension)
42 if get_option('doc').enabled()
43 error('Documentation enabled but gi-extension missing')
46 message('@0@ extensions not found, not building documentation requiring it'.format(extension))
51 if get_option('doc').enabled()
52 error('Documentation enabled but introspection not built.')
55 message('Introspection not built, can\'t build the documentation')
61 foreach f: ['gesmarshal.*',
63 'ges-auto-transition.*',
64 'ges-structured-interface.*',
65 'ges-structure-parser.*',
68 'ges-command-line-formatter.*',
69 'ges-base-xml-formatter.h',
70 'gstframepositioner.*',
71 'lex.priv_ges_parse_yy.c',
73 ges_excludes += [join_paths(meson.current_source_dir(), '..', '..', 'ges', f)]
76 hotdoc = import('hotdoc')
77 libs_doc = [hotdoc.generate_doc('gst-editing-services',
78 project_version: apiversion,
79 extra_assets: [join_paths(meson.current_source_dir(), 'images')],
80 gi_c_sources: ges_sources + ges_headers,
81 gi_c_source_roots: [join_paths(meson.current_source_dir(), '../ges/')],
82 gi_sources: [ges_gir[0].full_path()],
83 gi_c_source_filters: ges_excludes,
84 sitemap: 'sitemap.txt',
88 gi_order_generated_subpages: true,
89 dependencies: [ges_dep],
90 disable_incremental_build: true,
93 plugins_doc = [hotdoc.generate_doc('nle',
94 project_version: apiversion,
95 extra_assets: [join_paths(meson.current_source_dir(), 'images')],
96 sitemap: 'nle-sitemap.txt',
97 index: 'nle-index.md',
99 disable_incremental_build: true,
100 gst_order_generated_subpages: true,
101 gst_index: 'nle-index.md',
102 gst_c_sources: ['../../plugins/nle/*.[ch]'],
103 gst_smart_index: true,
104 gst_cache_file: plugins_cache,
105 gst_plugin_name: 'nle',