summaryrefslogtreecommitdiff
path: root/bindings/gir/meson.build
blob: c45c6f76246c789ed2d3d4fc2f79f82d01b9ba6a (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
# Copyright © 2018, 2019 Iñigo Martínez
# Copyright © 2019, 2020, 2021 Christian Persch
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library.  If not, see <https://www.gnu.org/licenses/>.

gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.9.0')

if get_option('gtk3')
  libvte_gtk3_gir_includes = [
    'cairo-1.0',
    'Gdk-3.0',
    'Gtk-3.0',
    'Pango-1.0',
  ]

  libvte_gtk3_gir = gnome.generate_gir(
    libvte_gtk3,
    sources: libvte_gtk3_public_headers + libvte_common_doc_sources,
    includes: libvte_gtk3_gir_includes,
    dependencies: libvte_gtk3_dep,
    extra_args: '-DVTE_COMPILATION',
    nsversion: vte_api_version,
    namespace: 'Vte',
    export_packages: vte_gtk3_api_name,
    header: 'vte' / 'vte.h',
    install: true,
  )
endif

if get_option('gtk4')
  libvte_gtk4_gir_includes = [
    'cairo-1.0',
    'Graphene-1.0',
    'Gsk-4.0',
    'Gdk-4.0',
    'Gtk-4.0',
    'Pango-1.0',
  ]

  # Ideally, the gir would be named something like "VteGtk4" instead,
  # but it seems that's not possible. So work around it using "Vte"
  # as namespace with this nsversion hack:
  gir_nsversion_gtk4 = '4-' + vte_api_version

  libvte_gtk4_gir = gnome.generate_gir(
    libvte_gtk4,
    dependencies: libvte_gtk4_dep,
    export_packages: vte_gtk4_api_name,
    extra_args: '-DVTE_COMPILATION',
    header: 'vte' / 'vte.h',
    includes: libvte_gtk4_gir_includes,
    install: true,
    namespace: 'Vte',
    nsversion: gir_nsversion_gtk4,
    sources: libvte_gtk4_public_headers + libvte_common_doc_sources,
    symbol_prefix: 'vte',
  )
endif