-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
118 lines (106 loc) · 2.87 KB
/
meson.build
File metadata and controls
118 lines (106 loc) · 2.87 KB
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
project('xpc_multiplexer', 'c')
# project setup
if get_option('buildtype') == 'debug'
# make a debug build target!
add_project_arguments(['-ggdb3'], language: 'c')
endif
# ========= BUILDING CONTROL =========
# Build tests?
should_build_tests = false
if get_option('build_tests') == 'yes'
should_build_tests = true
elif get_option('build_tests') == 'not_subproject'
should_build_tests = not meson.is_subproject()
endif
# ========= END BUILDING CONTROL =========
# ========= EXTERNAL PROJECT DEPENDENCIES =========
dep_alc_dynabuf = dependency(
'alc_dynabuf',
fallback: ['alibc.containers', 'dep_dynabuf']
)
dep_alc_array = dependency(
'alc_array',
fallback: ['alibc.containers', 'dep_array']
)
dep_alc_array_iter = dependency(
'alc_array_iter',
fallback: ['alibc.containers', 'dep_array_iter']
)
dep_alc_iterator = dependency(
'alc_iterator',
fallback: ['alibc.containers', 'dep_iterator']
)
dep_alc_hashmap = dependency(
'alc_hashmap',
fallback: ['alibc.containers', 'dep_hashmap']
)
dep_alc_hashmap_iter = dependency(
'alc_hashmap_iter',
fallback: ['alibc.containers', 'dep_hashmap_iter']
)
dep_alc_hash_functions = dependency(
'alc_hash_functions',
fallback: ['alibc.containers', 'dep_hash_functions']
)
dep_alc_comparators = dependency(
'alc_comparators',
fallback: ['alibc.containers', 'dep_comparators']
)
dep_txpc = dependency(
'tinyxpc',
fallback: ['tinyxpc', 'dep_txpc']
)
# ========= END EXTERNAL PROJECT DEPENDENCIES =========
includes = include_directories('include')
# ========= EXECUTABLE TARGETS =========
exe_main = executable(
'main',
[
'src/main.c',
'src/epoll_app.c',
'src/xpc_msg_queue.c',
'src/xpc_utils.c'
],
include_directories: includes,
dependencies: [
dep_alc_dynabuf,
dep_alc_array,
dep_alc_iterator,
dep_alc_array_iter,
dep_alc_hashmap,
dep_alc_hashmap_iter,
dep_alc_hash_functions,
dep_alc_comparators,
dep_txpc
]
)
# ========= END EXECUTABLE TARGETS =========
# ========= UNIT TEST BUILD TARGETS =========
ext_cmocka = dependency('cmocka', required: false)
if ext_cmocka.found() and should_build_tests
exe_msg_queue_test = executable(
'test_msg_queue',
[
'tests/test_msg_queue.c',
'src/xpc_msg_queue.c'
],
include_directories: includes,
link_with:
[
],
dependencies: [
ext_cmocka,
dep_txpc,
dep_alc_hashmap,
dep_alc_hashmap_iter,
dep_alc_hash_functions,
dep_alc_comparators,
dep_alc_array,
dep_alc_iterator,
dep_alc_array_iter,
]
)
# test run targets
test('test_msg_queue', exe_msg_queue_test)
endif
# ========= END UNIT TEST BUILD TARGETS =========