Merging gst-examples
[platform/upstream/gstreamer.git] / subprojects / gst-devtools / 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 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
13 if not hotdoc_p.found()
14     message('Hotdoc not found, not building the documentation')
15     subdir_done()
16 endif
17
18 required_hotdoc_extensions = ['gi-extension']
19 if not build_gir
20     if get_option('doc').enabled()
21         error('Documentation enabled but introspection not built.')
22     endif
23
24     message('Introspection not built, can\'t build the documentation')
25     subdir_done()
26 endif
27
28 hotdoc = import('hotdoc')
29 foreach extension: required_hotdoc_extensions
30     if not hotdoc.has_extensions(extension)
31         if get_option('doc').enabled()
32             error('Documentation enabled but @0@ missing'.format(extension))
33         endif
34
35         message('@0@ extension not found, not building documentation'.format(extension))
36         subdir_done()
37     endif
38 endforeach
39
40 excludes = ['gettext.h',
41     'gst-validate-internal.h',
42     'gst-validate-i18n-lib.c'
43 ]
44
45 build_hotdoc = true
46 validate_excludes = []
47 foreach f: excludes
48     validate_excludes += [join_paths(meson.current_source_dir(), '..',
49         'validate', 'gst', 'validate', f)]
50 endforeach
51
52 validate_sources = []
53 foreach f: gstvalidate_headers + gstvalidate_sources
54     validate_sources += [join_paths(meson.current_source_dir(), '..',
55         'validate', 'gst', 'validate', f)]
56 endforeach
57
58 hotdoc = import('hotdoc')
59 plugins_doc = []
60 libs_doc = [hotdoc.generate_doc('gst-devtools',
61     project_version: apiversion,
62     sitemap: 'sitemap.txt',
63     index: 'index.md',
64     gi_c_sources: validate_sources,
65     gi_c_source_filters: validate_excludes,
66     gi_index: 'gi-index.md',
67     gi_smart_index: true,
68     gi_sources: [validate_gir[0].full_path()],
69     disable_incremental_build: true,
70     dependencies : [validate_dep],
71 )]