summaryrefslogtreecommitdiff
path: root/champlain-gtk/meson.build
blob: 5309b4d6ababed78d4ddd9f42baa1a3b39bb4abe (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
libchamplain_gtk_public_h = [
  'champlain-gtk.h',
  'gtk-champlain-embed.h',
]

libchamplain_gtk_sources = [
  'gtk-champlain-embed.c',
]

libchamplain_gtk_requires = [
  gtk_dep,
  clutter_gtk_dep,
]

libchamplain_gtk_deps = libchamplain_gtk_requires + [
  glib_dep,
  gobject_dep,
  libchamplain_dep,
]

libchamplain_gtk_srcdir = include_directories('.')

libchamplain_gtk_c_args = [
  '-DHAVE_CONFIG_H',
  '-DCHAMPLAIN_GTK_COMPILATION',
  '-DG_LOG_DOMAIN="@0@"'.format(package_gtk_name),
]

libchamplain_gtk_link_args = [
]

libchamplain_gtk_includedir = join_paths(
  pkgincludedir,
  'champlain-gtk',
)

install_headers(
  libchamplain_gtk_public_h,
  install_dir: libchamplain_gtk_includedir,
)

libchamplain_gtk_sha = library(
  package_gtk_string,
  libchamplain_gtk_sources,
  version: lib_version,
  include_directories: rootdir,
  dependencies: libchamplain_gtk_deps,
  c_args: libchamplain_gtk_c_args,
  link_args: libchamplain_gtk_link_args,
  install: true,
  install_dir: libdir,
)

libchamplain_gtk_dep_sources = [
]

if generate_gir
  libchamplain_gtk_gir_includes = [
    'GObject-2.0',
    'Clutter-1.0',
    'Gtk-3.0',
    libchamplain_gir.get(0),
  ]

  libchamplain_gtk_gir = gnome.generate_gir(
    libchamplain_gtk_sha,
    sources: libchamplain_gtk_sources + libchamplain_gtk_public_h,
    nsversion: api_version,
    namespace: 'GtkChamplain',
    symbol_prefix: 'gtk_champlain',
    identifier_prefix: 'GtkChamplain',
    header: 'champlain-gtk/champlain-gtk.h',
    export_packages: [package_gtk_string],
    includes: ['Clutter-1.0', 'Gtk-3.0', libchamplain_gir.get(0)],
    link_with: libchamplain_gtk_sha,
    install: true,
    install_dir_gir: girdir,
    install_dir_typelib: typelibdir,
    extra_args: [
      '-DCHAMPLAIN_GTK_COMPILATION',
    ]
  )

  libchamplain_gtk_dep_sources += [
    libchamplain_gtk_gir,
  ]

  if generate_vapi
    libchamplain_gtk_vapi_packages = [
      'clutter-gtk-1.0',
      'cogl-pango-1.0',
      'gtk+-3.0',
      'atk',
      'pangocairo',
      libchamplain_vapi,
    ]

    libchamplain_gtk_vapi = gnome.generate_vapi(
      package_gtk_string,
      sources: libchamplain_gtk_gir.get(0),
      packages: libchamplain_gtk_vapi_packages,
      install: true,
      install_dir: vapidir,
    )
  endif
endif

libchamplain_gtk_dep = declare_dependency(
  link_with: libchamplain_gtk_sha,
  include_directories: rootdir,
  dependencies: libchamplain_gtk_requires + [libchamplain_dep],
  sources: libchamplain_gtk_dep_sources,
)

libchamplain_gtk_pc = pkg.generate(
  libchamplain_gtk_sha,
  description: 'Gtk+ Widget wrapper for libchamplain',
  subdirs: package_string,
  install_dir: pkgconfigdir,
  requires: libchamplain_gtk_requires + [libchamplain_sha],
)