-
-
Notifications
You must be signed in to change notification settings - Fork 459
/
meson.build
181 lines (166 loc) · 5.48 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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
project('flecs', 'c', license : 'mit', default_options : ['c_std=c99'])
flecs_args = []
if get_option('default_library') == 'static'
flecs_args = '-Dflecs_STATIC'
endif
flecs_inc = include_directories('include')
flecs_deps = [
dependency('threads')
]
cc = meson.get_compiler('c')
if host_machine.system() == 'windows'
flecs_deps += cc.find_library('ws2_32') # Required for http addon
endif
flecs_src = files(
'src/addons/alerts.c',
'src/addons/doc.c',
'src/addons/flecs_cpp.c',
'src/addons/http.c',
'src/addons/journal.c',
'src/addons/json/deserialize_value.c',
'src/addons/json/deserialize.c',
'src/addons/json/json.c',
'src/addons/json/serialize_entity.c',
'src/addons/json/serialize_field_info.c',
'src/addons/json/serialize_iter_result_query.c',
'src/addons/json/serialize_iter_result_table.c',
'src/addons/json/serialize_iter_result.c',
'src/addons/json/serialize_iter.c',
'src/addons/json/serialize_query_info.c',
'src/addons/json/serialize_type_info.c',
'src/addons/json/serialize_value.c',
'src/addons/json/serialize_world.c',
'src/addons/stats/monitor.c',
'src/addons/stats/pipeline_monitor.c',
'src/addons/stats/stats.c',
'src/addons/stats/system_monitor.c',
'src/addons/stats/world_monitor.c',
'src/addons/stats/world_summary.c',
'src/addons/log.c',
'src/addons/meta/api.c',
'src/addons/meta/definitions.c',
'src/addons/meta/meta.c',
'src/addons/meta/serialized.c',
'src/addons/meta/cursor.c',
'src/addons/meta/rtt_lifecycle.c',
'src/addons/meta/c_utils.c',
'src/addons/metrics.c',
'src/addons/module.c',
'src/addons/os_api_impl/os_api_impl.c',
'src/addons/pipeline/pipeline.c',
'src/addons/pipeline/worker.c',
'src/addons/rest.c',
'src/addons/script/template.c',
'src/addons/script/ast.c',
'src/addons/script/function.c',
'src/addons/script/functions_builtin.c',
'src/addons/script/functions_math.c',
'src/addons/script/parser.c',
'src/addons/script/query_parser.c',
'src/addons/script/script.c',
'src/addons/script/serialize.c',
'src/addons/script/tokenizer.c',
'src/addons/script/vars.c',
'src/addons/script/visit_check.c',
'src/addons/script/visit_eval.c',
'src/addons/script/visit_free.c',
'src/addons/script/visit_to_str.c',
'src/addons/script/visit.c',
'src/addons/script/expr/ast.c',
'src/addons/script/expr/parser.c',
'src/addons/script/expr/stack.c',
'src/addons/script/expr/util.c',
'src/addons/script/expr/visit_eval.c',
'src/addons/script/expr/visit_fold.c',
'src/addons/script/expr/visit_free.c',
'src/addons/script/expr/visit_to_str.c',
'src/addons/script/expr/visit_type.c',
'src/addons/system/system.c',
'src/addons/timer.c',
'src/addons/units.c',
'src/datastructures/allocator.c',
'src/datastructures/bitset.c',
'src/datastructures/block_allocator.c',
'src/datastructures/hash.c',
'src/datastructures/hashmap.c',
'src/datastructures/map.c',
'src/datastructures/stack_allocator.c',
'src/datastructures/name_index.c',
'src/datastructures/sparse.c',
'src/datastructures/strbuf.c',
'src/datastructures/switch_list.c',
'src/datastructures/vec.c',
'src/storage/entity_index.c',
'src/storage/id_index.c',
'src/storage/table.c',
'src/storage/table_cache.c',
'src/storage/table_graph.c',
'src/query/compiler/compiler_term.c',
'src/query/compiler/compiler.c',
'src/query/engine/cache_iter.c',
'src/query/engine/cache_order_by.c',
'src/query/engine/cache.c',
'src/query/engine/change_detection.c',
'src/query/engine/eval_iter.c',
'src/query/engine/eval_member.c',
'src/query/engine/eval_pred.c',
'src/query/engine/eval_toggle.c',
'src/query/engine/eval_trav.c',
'src/query/engine/eval_union.c',
'src/query/engine/eval_up.c',
'src/query/engine/eval_utils.c',
'src/query/engine/eval.c',
'src/query/engine/trav_cache.c',
'src/query/engine/trav_down_cache.c',
'src/query/engine/trav_up_cache.c',
'src/query/engine/trivial_iter.c',
'src/query/api.c',
'src/query/util.c',
'src/query/validator.c',
'src/bootstrap.c',
'src/each.c',
'src/entity_name.c',
'src/entity.c',
'src/id.c',
'src/iter.c',
'src/misc.c',
'src/observable.c',
'src/observer.c',
'src/os_api.c',
'src/poly.c',
'src/stage.c',
'src/search.c',
'src/value.c',
'src/world.c',
)
install_headers('include/flecs.h')
install_subdir('include/flecs', install_dir : get_option('includedir'))
flecs_lib = library('flecs',
flecs_src,
install : true,
c_args : [ '-Dflecs_EXPORTS', flecs_args ],
dependencies : flecs_deps,
include_directories : flecs_inc,
implicit_include_directories : false
)
flecs_dep = declare_dependency(
link_with : flecs_lib,
compile_args : flecs_args,
dependencies : flecs_deps,
include_directories : flecs_inc
)
opt_helloworld = get_option('build_example').disable_auto_if(meson.is_subproject())
if opt_helloworld.allowed()
helloworld_inc = include_directories('examples/c/hello_world/include')
helloworld_exe = executable('helloworld',
'examples/c/hello_world/src/main.c',
include_directories : helloworld_inc,
implicit_include_directories : false,
dependencies : flecs_dep
)
endif
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('flecs', flecs_dep)
endif
pkg = import('pkgconfig')
pkg.generate(flecs_lib)