-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
198 lines (190 loc) · 8.46 KB
/
BUILD.bazel
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_ecsact//ecsact:defs.bzl", "ecsact_build_recipe", "ecsact_build_recipe_bundle")
load("//bazel:copts.bzl", "copts")
package(default_visibility = ["//visibility:public"])
raw_url = "https://raw.githubusercontent.com"
filegroup(
name = "headers",
srcs = glob(["ecsact/**/*.hh"]),
)
cc_library(
name = "lib",
hdrs = glob(["ecsact/**/*.hh"]),
copts = copts,
)
cc_test(
name = "test",
visibility = ["//visibility:private"],
copts = copts,
defines = [
"ECSACT_CORE_API=",
"ECSACT_DYNAMIC_API=",
],
srcs = [
"build_test.cc",
"//runtime:sources",
],
deps = [
":lib",
"@ecsact_runtime//:common",
"@ecsact_runtime//:core",
"@ecsact_runtime//:dynamic",
"@entt",
"@xxhash",
],
)
ecsact_build_recipe(
name = "ecsact_rt_entt_recipe",
srcs = [
":headers",
"//runtime:sources",
],
codegen_plugins = {
"@ecsact_lang_cpp//cpp_header_codegen": "src",
"//rt_entt_codegen": "src",
},
fetch_srcs = {
"include/entt": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/entt.hpp",
],
"include/entt/graph": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/graph/adjacency_matrix.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/graph/flow.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/graph/dot.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/graph/fwd.hpp",
],
"include/entt/locator": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/locator/locator.hpp",
],
"include/entt/poly": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/poly/fwd.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/poly/poly.hpp",
],
"include/entt/process": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/process/fwd.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/process/process.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/process/scheduler.hpp",
],
"include/entt/resource": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/resource/cache.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/resource/fwd.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/resource/loader.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/resource/resource.hpp",
],
"include/entt/entity": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/registry.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/storage.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/entity.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/group.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/fwd.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/sparse_set.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/component.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/mixin.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/view.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/handle.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/helper.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/observer.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/organizer.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/runtime_view.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/entity/snapshot.hpp",
],
"include/entt/meta": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/adl_pointer.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/container.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/context.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/factory.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/fwd.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/meta.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/node.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/pointer.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/policy.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/range.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/resolve.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/template.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/type_traits.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/meta/utility.hpp",
],
"include/entt/platform": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/platform/android-ndk-r17.hpp",
],
"include/entt/signal": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/signal/sigh.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/signal/delegate.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/signal/dispatcher.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/signal/emitter.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/signal/fwd.hpp",
],
"include/entt/config": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/config/version.h",
raw_url + "/skypjack/entt/v3.12.2/src/entt/config/macro.h",
raw_url + "/skypjack/entt/v3.12.2/src/entt/config/config.h",
],
"include/entt/container": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/container/dense_map.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/container/fwd.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/container/dense_set.hpp",
],
"include/entt/core": [
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/compressed_pair.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/type_traits.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/fwd.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/iterator.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/memory.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/algorithm.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/utility.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/any.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/type_info.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/attribute.h",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/hashed_string.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/enum.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/family.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/ident.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/monostate.hpp",
raw_url + "/skypjack/entt/v3.12.2/src/entt/core/tuple.hpp",
],
"include": [
raw_url + "/Cyan4973/xxHash/v0.8.2/xxhash.h",
raw_url + "/Cyan4973/xxHash/v0.8.2/xxhash.c",
],
},
exports = [
# core
"ecsact_execute_systems",
"ecsact_create_registry",
"ecsact_clone_registry",
"ecsact_hash_registry",
"ecsact_destroy_registry",
"ecsact_clear_registry",
"ecsact_create_entity",
"ecsact_ensure_entity",
"ecsact_entity_exists",
"ecsact_destroy_entity",
"ecsact_count_entities",
"ecsact_get_entities",
"ecsact_add_component",
"ecsact_has_component",
"ecsact_get_component",
"ecsact_count_components",
"ecsact_each_component",
"ecsact_get_components",
"ecsact_update_component",
"ecsact_remove_component",
# dynamic
"ecsact_system_execution_context_same",
"ecsact_system_execution_context_entity",
"ecsact_system_execution_context_generate",
"ecsact_system_execution_context_id",
"ecsact_system_execution_context_other",
"ecsact_system_execution_context_add",
"ecsact_system_execution_context_remove",
"ecsact_system_execution_context_get",
"ecsact_system_execution_context_update",
"ecsact_system_execution_context_has",
"ecsact_system_execution_context_action",
],
)
exports_files(["build_recipe.yml"])
ecsact_build_recipe_bundle(
name = "ecsact_rt_entt",
recipes = [":ecsact_rt_entt_recipe"],
)