File: meson.rst

package info (click to toggle)
gobject-introspection 1.84.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 72,336 kB
  • sloc: ansic: 562,269; python: 23,692; xml: 16,240; yacc: 1,711; perl: 1,624; sh: 1,139; lex: 510; cpp: 487; makefile: 182; javascript: 15; lisp: 1
file content (51 lines) | stat: -rw-r--r-- 1,563 bytes parent folder | download | duplicates (2)
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
=================
Meson Integration
=================

Support for generating GObject introspection data is included in Meson
directly  and accessible through the ``gnome.generate_gir()`` function. See
the `meson documentation
<https://mesonbuild.com/Gnome-module.html#gnomegenerate_gir>`__ for details.

For some real examples, see the meson build definitions of various GNOME
modules:

Pango:
  https://gitlab.gnome.org/GNOME/pango/blob/main/pango/meson.build

  .. code-block:: meson

    pango_gir = gnome.generate_gir(
      libpango,
      sources: pango_sources + pango_headers + [ pango_enum_h, pango_features_h ],
      namespace: 'Pango',
      nsversion: pango_api_version,
      identifier_prefix: 'Pango',
      symbol_prefix: 'pango',
      export_packages: 'pango',
      dependencies: pango_deps,
      includes: [ 'HarfBuzz-0.0', 'GObject-2.0', 'Gio-2.0', 'cairo-1.0' ],
      header: 'pango/pango.h',
      install: true,
      extra_args: gir_args,
    )

json-glib:
  https://gitlab.gnome.org/GNOME/json-glib/blob/main/json-glib/meson.build

  .. code-block:: meson

    json_glib_gir = gnome.generate_gir(
      json_lib,
      sources: source_c + source_h + json_glib_enums + [ json_version_h ],
      namespace: 'Json',
      nsversion: json_api_version,
      identifier_prefix: 'Json',
      symbol_prefix: 'json',
      export_packages: json_api_name,
      includes: [ 'GObject-2.0', 'Gio-2.0', ],
      header: 'json-glib/json-glib.h',
      install: true,
      extra_args: gir_args,
      fatal_warnings: get_option('werror'),
    )