-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
85 lines (71 loc) · 2.24 KB
/
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
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
project('dopamine', ['c', 'd'],
default_options: ['c_std=c99', 'default_library=static'],
version: '0.1.0-alpha.1',
)
if meson.get_compiler('d').get_id() == 'dmd'
add_global_arguments('-vcolumns',
language: 'd'
)
endif
# check options consistency
if get_option('enable_test')
if not get_option('enable_client') or not get_option('enable_registry')
error('both client and registry are needed to enable tests')
endif
endif
if get_option('enable_client') or get_option('enable_test')
subdir('3rdparty')
endif
if get_option('enable_client') or get_option('enable_registry') or get_option('enable_admin') or get_option('enable_test')
squiz_proj = subproject('squiz-box',
default_options: ['enable_zstd=false'],
)
squiz_dep = squiz_proj.get_variable('squiz_dep')
endif
if get_option('enable_client')
pkgconf_proj = subproject('pkgconf',
default_options: ['tests=false'],
)
pkgconf_lib = pkgconf_proj.get_variable('libpkgconf')
endif
vibed_version = '0.9.6'
if get_option('enable_registry') or get_option('enable_frontend_server') or get_option('enable_test')
vibed_http_dep = dependency('vibe-d:http',
method: 'dub',
version: vibed_version,
)
endif
if get_option('enable_registry') or get_option('enable_admin')
if host_machine.system() == 'windows'
src_dir = meson.current_source_dir()
libpq_file = src_dir / 'windows-x64/lib/libpq.lib'
libpq_dep = declare_dependency(
link_args: libpq_file,
)
else
libpq_dep = dependency('libpq',
version: '>= 14.3',
method: 'pkg-config',
)
endif
endif
vibed_data_dep = dependency('vibe-d:data',
method: 'dub',
version: vibed_version,
)
if get_option('enable_test')
ut_assertions_dep = dependency('unit-threaded:assertions',
method: 'dub',
version: '2.1.6',
)
stupid_gen_exe = executable('stupid_gen', 'tools/stupid_gen.d',
d_import_dirs: include_directories('tools'),
)
endif
if get_option('enable_client') or get_option('enable_test')
config_gen = executable('config_generator', 'tools/config_generator.d')
endif
subdir('packages')
if get_option('enable_test')
subdir('tests_e2e')
endif