-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
53 lines (38 loc) · 1019 Bytes
/
meson.build
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
project('mongoc vapi', 'vala', 'c')
dependencies = [
dependency('glib-2.0'),
dependency('gobject-2.0'),
dependency('libmongoc-1.0')
]
# build options
verbose_opt = get_option('verbose')
onefile_opt = get_option('onefile')
verbose = ''
onefile = ''
if verbose_opt
verbose = '--verbose'
endif
if onefile_opt
onefile = '--onefile'
else
add_project_arguments(['-D', 'SEPARATED_VAPI'], language : 'vala')
dependencies += dependency('libbson-1.0')
endif
vapi_dir = meson.current_source_dir() / 'vapi'
vapi_out = '--out ' + vapi_dir
add_project_arguments(['--vapidir', vapi_dir, '--pkg', 'posix'], language: 'vala')
test_opt = get_option('test')
sample_opt = get_option('example')
if test_opt
subdir('test')
endif
if sample_opt
subdir('samples')
endif
# compose vapis
python3 = find_program('python3', 'python')
compose = files('compose.py')
r = run_command(python3, compose, vapi_out, verbose, onefile)
if r.returncode() != 0
error('Could not compose vapi files')
endif