forked from SanderMertens/flecs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
105 lines (93 loc) · 2.72 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
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')
flecs_src = files(
'src/addons/coredoc.c',
'src/addons/deprecated.c',
'src/addons/doc.c',
'src/addons/expr/deserialize.c',
'src/addons/expr/serialize.c',
'src/addons/expr/strutil.c',
'src/addons/http.c',
'src/addons/json/deserialize.c',
'src/addons/json/serialize.c',
'src/addons/json/serialize_type_info.c',
'src/addons/json/json.c',
'src/addons/log.c',
'src/addons/meta/api.c',
'src/addons/meta/meta.c',
'src/addons/meta/serialized.c',
'src/addons/meta/cursor.c',
'src/addons/meta_c.c',
'src/addons/module.c',
'src/addons/os_api_impl/os_api_impl.c',
'src/addons/parser.c',
'src/addons/pipeline/pipeline.c',
'src/addons/pipeline/worker.c',
'src/addons/plecs.c',
'src/addons/rest.c',
'src/addons/rules.c',
'src/addons/snapshot.c',
'src/addons/stats.c',
'src/addons/system/system.c',
'src/addons/timer.c',
'src/datastructures/bitset.c',
'src/datastructures/hash.c',
'src/datastructures/hashmap.c',
'src/datastructures/map.c',
'src/datastructures/qsort.c',
'src/datastructures/sparse.c',
'src/datastructures/strbuf.c',
'src/datastructures/switch_list.c',
'src/datastructures/vector.c',
'src/bootstrap.c',
'src/entity.c',
'src/filter.c',
'src/hierarchy.c',
'src/iter.c',
'src/misc.c',
'src/observable.c',
'src/observer.c',
'src/os_api.c',
'src/poly.c',
'src/query.c',
'src/stage.c',
'src/table_cache.c',
'src/table_graph.c',
'src/table.c',
'src/trigger.c',
'src/search.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
)
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
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('flecs', flecs_dep)
endif
pkg = import('pkgconfig')
pkg.generate(flecs_lib)