summaryrefslogtreecommitdiff
path: root/docs/meson.build
blob: a99448af51fa01ea4feca78730d81c216f9d13c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
subdir('xml')

version_xml_conf = configuration_data()
version_xml_conf.set('PANGO_VERSION', meson.project_version())
configure_file(input: 'version.xml.in',
               output: 'version.xml',
               configuration: version_xml_conf)

private_headers = [
  'pangocairo-private.h',
  'pangocairo-fc-private.h',
  'pangocairo-fc.h',
  'pangocairo-win32.h',
  'pangocairo-atsui.h',
  'pango-coverage-private.h',
  'pango-color-table.h',
  'pango-emoji-private.h',
  'pango-font-private.h',
  'pango-fontmap-private.h',
  'pango-fontset-private.h',
  'pango-impl-utils.h',
  'pango-glyph-item-private.h',
  'pango-layout-private.h',
  'pango-script-table.h',
  'pango-script-private.h',
  'pango-utils-private.h',
  'pangofc-private.h',
  'pangofc-fontmap-private.h',
  'pangoft2-private.h',
  'pangowin32-private.h',
  'pangoatsui-private.h',
  'pangoxft-private.h',
  'pango-ot-private.h',
  'pango-script-lang-table.h',
  'pango-language-sample-table.h',
  'pangocoretext-private.h',
]

content_files = [
  'pango_markup.sgml',
  'version.xml',
]

html_images = [
  'layout.png',
  'pipeline.png',
  'rotated-text.png',
  'rects1.png',
  'rects2.png',
]

docdeps = [ libpango_dep ]

if build_pangoft2
  docdeps += libpangoft2_dep
endif

if xft_dep.found()
  docdeps += libpangoxft_dep
endif

if cairo_dep.found()
  docdeps += libpangocairo_dep
endif

glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
cairo_prefix = dependency('cairo').get_pkgconfig_variable('prefix')
cairo_docpath = join_paths(cairo_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(pango_datadir, 'gtk-doc', 'html')

gnome.gtkdoc('pango',
             main_xml: 'pango-docs.sgml',
             src_dir: [
               join_paths(meson.source_root(), 'pango'),
               join_paths(meson.build_root(), 'pango'),
             ],
             dependencies: docdeps,
             gobject_typesfile: configure_file(input: 'pango.types.in',
                                               output: 'pango.types',
                                               configuration: pango_conf),
             scan_args: [
               '--deprecated-guards=PANGO_DISABLE_DEPRECATED',
               '--ignore-decorators=_PANGO_EXTERN',
               '--ignore-headers=' + ' '.join(private_headers),
             ],
             mkdb_args: [
               '--sgml-mode',
               '--output-format=xml',
             ],
             fixxref_args: [
               '--html-dir=@0@'.format(docpath),
               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
               '--extra-dir=@0@'.format(join_paths(cairo_docpath, 'cairo')),
             ],
             html_assets: html_images,
             install: true)