summaryrefslogtreecommitdiff
path: root/girepository/meson.build
blob: b020caa4434901750cf8239831077ec9ef013948 (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
subdir('cmph')

girepo_gthash_lib = static_library('girepository-gthash',
  sources: 'gthash.c',
  include_directories : configinc,
  c_args: gi_hidden_visibility_cflags,
  dependencies: [
    cmph_dep,
    glib_dep,
    gmodule_dep,
  ],
)

girepo_gthash_dep = declare_dependency(
  link_with: girepo_gthash_lib,
  dependencies: [glib_dep, gmodule_dep],
  include_directories: include_directories('.'),
)

girepo_internals_lib = static_library('girepository-internals',
  sources: [
    'girmodule.c',
    'girnode.c',
    'giroffsets.c',
    'girparser.c',
    'girwriter.c',
  ],
  c_args: gi_hidden_visibility_cflags,
  include_directories : configinc,
  dependencies: [girepo_gthash_dep, libffi_dep],
)

girepo_internals_dep = declare_dependency(
  link_with: girepo_internals_lib,
  dependencies: libffi_dep,
  include_directories: include_directories('.'),
)

girepo_headers = [
  'giarginfo.h',
  'gibaseinfo.h',
  'gicallableinfo.h',
  'giconstantinfo.h',
  'gienuminfo.h',
  'gifieldinfo.h',
  'gifunctioninfo.h',
  'giinterfaceinfo.h',
  'giobjectinfo.h',
  'gipropertyinfo.h',
  'giregisteredtypeinfo.h',
  'girepository.h',
  'girffi.h',
  'gisignalinfo.h',
  'gistructinfo.h',
  'gitypeinfo.h',
  'gitypelib.h',
  'gitypes.h',
  'giunioninfo.h',
  'giversionmacros.h',
  'givfuncinfo.h',
]

girepo_sources = [
  'gdump.c',
  'giarginfo.c',
  'gibaseinfo.c',
  'gicallableinfo.c',
  'giconstantinfo.c',
  'gienuminfo.c',
  'gifieldinfo.c',
  'gifunctioninfo.c',
  'ginvoke.c',
  'giinterfaceinfo.c',
  'giobjectinfo.c',
  'gipropertyinfo.c',
  'giregisteredtypeinfo.c',
  'girepository.c',
  'girffi.c',
  'gisignalinfo.c',
  'gistructinfo.c',
  'gitypeinfo.c',
  'gitypelib.c',
  'giunioninfo.c',
  'givfuncinfo.c',
]

# Used in gir/meson.build
girepo_gir_sources = files(
  'giarginfo.c',
  'gibaseinfo.c',
  'gicallableinfo.c',
  'giconstantinfo.c',
  'gienuminfo.c',
  'gifieldinfo.c',
  'gifunctioninfo.c',
  'giinterfaceinfo.c',
  'giobjectinfo.c',
  'gipropertyinfo.c',
  'giregisteredtypeinfo.c',
  'girepository.c',
  'gisignalinfo.c',
  'gistructinfo.c',
  'gitypeinfo.c',
  'giunioninfo.c',
  'givfuncinfo.c',
  'giarginfo.h',
  'gibaseinfo.h',
  'gicallableinfo.h',
  'giconstantinfo.h',
  'gienuminfo.h',
  'gifieldinfo.h',
  'gifunctioninfo.h',
  'giinterfaceinfo.h',
  'giobjectinfo.h',
  'gipropertyinfo.h',
  'giregisteredtypeinfo.h',
  'girepository.h',
  'gisignalinfo.h',
  'gistructinfo.h',
  'gitypeinfo.h',
  'gitypelib.h',
  'gitypes.h',
  'giunioninfo.h',
  'givfuncinfo.h',
)

install_headers(girepo_headers, subdir: 'gobject-introspection-1.0')

girepo_lib = shared_library('girepository-1.0',
  sources: girepo_sources,
  include_directories : configinc,
  c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'],
  dependencies: [glib_dep, gobject_dep, gmodule_dep,
                 gio_dep, girepo_internals_dep],
  version: '1.0.0',
  install: true,
)

install_data('gdump.c',
  install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0')
)

girepo_dep = declare_dependency(
  link_with: girepo_lib,
  dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
  include_directories: include_directories('.'),
)

gthash_test = executable('gthash-test', 'gthash-test.c',
  dependencies: girepo_gthash_dep,
)

test('gthash-test', gthash_test)

if giounix_dep.found()
  executable('gi-dump-types', 'gi-dump-types.c',
    dependencies: [girepo_dep, giounix_dep])
endif