-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
71 lines (62 loc) · 1.19 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
project(
'fsmtp',
'cpp',
default_options: [
'cpp_std=c++17'
]
)
lib_openssl = dependency('openssl')
lib_threads = dependency('threads')
lib_hiredis = dependency('hiredis')
lib_catch2 = dependency('catch2')
lib_boost = dependency('boost')
lib_zlib = dependency('zlib')
subdir('env')
comp_cc = meson.get_compiler('cpp')
lib_resolv = comp_cc.find_library('resolv', required: true)
lib_cassandra = comp_cc.find_library('cassandra', required: true)
lib_jsoncpp = comp_cc.find_library('jsoncpp', required: true)
lib_boost_iostreams = comp_cc.find_library('boost_iostreams', required: true)
lib_curl = comp_cc.find_library('curl', required: true)
sources = [
'main.cc'
]
test_sources = [
'tests.cc'
]
subdir('lib')
subdir('tests')
executable(
'fsmtp',
sources,
dependencies: [
lib_openssl,
lib_cassandra,
lib_threads,
lib_hiredis,
lib_resolv,
lib_jsoncpp,
lib_boost,
lib_zlib,
lib_boost_iostreams,
lib_curl
]
)
unit_tests = executable(
'unit_tests',
test_sources,
dependencies: [
lib_openssl,
lib_cassandra,
lib_threads,
lib_hiredis,
lib_resolv,
lib_jsoncpp,
lib_catch2,
lib_boost,
lib_zlib,
lib_boost_iostreams,
lib_curl
]
)
test('Unit tests', unit_tests)