summaryrefslogtreecommitdiff
path: root/docs/meson.build
blob: bdea5e50addb876d845a442b5bb2b1ec4da15b5c (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
gidocgen = find_program('gi-docgen', required: get_option('gtk_doc'))

pango_content_files = [
  'pango_rendering.md',
  'pango-name.png',
  'layout.png',
  'pipeline.png',
  'rects1.png',
  'rects2.png',
  'rects3.png',
]

doc_conf = configuration_data()
doc_conf.set('PANGO_VERSION', meson.project_version())

pango_toml = configure_file(input: 'pango.toml.in',
                            output: 'pango.toml',
                            configuration: doc_conf)

custom_target('pango-doc',
  input: pango_gir[0],
  output: 'Pango',
  command: [
    gidocgen,
    'generate',
    '--quiet',
    '--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
    '--config', pango_toml,
    '--output-dir=@OUTPUT@',
    '--no-namespace-dir',
    '--content-dir=@0@'.format(meson.current_source_dir()),
    '@INPUT@',
  ],
  depend_files: [ pango_toml, pango_content_files],
  build_by_default: true,
)

if build_pangoft2
  pangoft2_toml = configure_file(input: 'pangoft2.toml.in',
                                 output: 'pangoft2.toml',
                                 configuration: doc_conf)

  custom_target('pangoft-doc',
    input: pangoft2_gir[0],
    output: 'PangoFT2',
    command: [
      gidocgen,
      'generate',
      '--quiet',
      '--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
      '--config', pangoft2_toml,
      '--output-dir=@OUTPUT@',
      '--no-namespace-dir',
      '--content-dir=@0@'.format(meson.current_source_dir()),
      '@INPUT@',
    ],
    depend_files: [ pangoft2_toml, 'pango-name.png' ],
    build_by_default: true,
  )
endif

if xft_dep.found() and fontconfig_dep.found()
  pangoxft_toml = configure_file(input: 'pangoxft.toml.in',
                                 output: 'pangoxft.toml',
                                 configuration: doc_conf)

  custom_target('pangoxft-doc',
    input: pangoxft_gir[0],
    output: 'PangoXft',
    command: [
      gidocgen,
      'generate',
      '--quiet',
      '--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
      '--config', pangoxft_toml,
      '--output-dir=@OUTPUT@',
      '--no-namespace-dir',
      '--content-dir=@0@'.format(meson.current_source_dir()),
      '@INPUT@',
    ],
    depend_files: [ pangoxft_toml, 'pango-name.png' ],
    build_by_default: true,
  )
endif

if cairo_dep.found()
  pangocairo_content_files = [
    'pango-name.png',
    'rotated-text.png',
  ]

  pangocairo_toml = configure_file(input: 'pangocairo.toml.in',
                                   output: 'pangocairo.toml',
                                   configuration: doc_conf)

  custom_target('pangocairo-doc',
    input: pangocairo_gir[0],
    output: 'PangoCairo',
    command: [
      gidocgen,
      'generate',
      '--quiet',
      '--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
      '--config', pangocairo_toml,
      '--output-dir=@OUTPUT@',
      '--no-namespace-dir',
      '--content-dir=@0@'.format(meson.current_source_dir()),
      '@INPUT@',
    ],
    depend_files: [ pangocairo_toml, pangocairo_content_files ],
    build_by_default: true,
  )
endif

pangoot_toml = configure_file(input: 'pangoot.toml.in',
                              output: 'pangoot.toml',
                              configuration: doc_conf)

custom_target('pangoot-doc',
  input: pangoot_gir[0],
  output: 'PangoOT',
  command: [
    gidocgen,
    'generate',
    '--quiet',
    '--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
    '--config', pangoot_toml,
    '--output-dir=@OUTPUT@',
    '--no-namespace-dir',
    '--content-dir=@0@'.format(meson.current_source_dir()),
    '@INPUT@',
  ],
  depend_files: [ pangoot_toml, 'pango-name.png' ],
  build_by_default: true,
)

if fontconfig_dep.found()
  pangofc_toml = configure_file(input: 'pangofc.toml.in',
                                output: 'pangofc.toml',
                                configuration: doc_conf)

  custom_target('pangofc-doc',
    input: pangofc_gir[0],
    output: 'PangoFc',
    command: [
      gidocgen,
      'generate',
      '--quiet',
      '--add-include-path=@0@'.format(meson.current_build_dir() / '../pango'),
      '--config', pangofc_toml,
      '--output-dir=@OUTPUT@',
      '--no-namespace-dir',
      '--content-dir=@0@'.format(meson.current_source_dir()),
      '@INPUT@',
    ],
    depend_files: [ pangofc_toml, 'pango-name.png' ],
    build_by_default: true,
  )
endif