Skip to content

Commit 1a2c65d

Browse files
authored
feat: new EcsactUnrealCodgen tool (#20)
1 parent 8deceb4 commit 1a2c65d

File tree

6 files changed

+452
-0
lines changed

6 files changed

+452
-0
lines changed

Tools/EcsactUnrealCodegen/.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
common --enable_bzlmod
2+
try-import %workspace%/user.bazelrc

Tools/EcsactUnrealCodegen/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/bazel-*
2+
/external
3+
/compile_commands.json
4+
*.bazel.lock
5+
user.bazelrc

Tools/EcsactUnrealCodegen/BUILD.bazel

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
2+
load("@rules_cc//cc:defs.bzl", "cc_binary")
3+
4+
cc_binary(
5+
name = "EcsactUnrealCodegen",
6+
srcs = ["EcsactUnrealCodegen.cpp"],
7+
copts = [
8+
"-std=c++20",
9+
"-fexperimental-library",
10+
],
11+
linkopts = select({
12+
"//conditions:default": [],
13+
"@platforms//os:windows": [
14+
"-lWs2_32",
15+
"-lMswsock",
16+
"-lBcrypt",
17+
],
18+
}),
19+
deps = [
20+
"@boost.process",
21+
"@boost.program_options",
22+
],
23+
)
24+
25+
PLATFORMS = [
26+
"@zig_sdk//platform:windows_amd64",
27+
"@zig_sdk//platform:linux_amd64",
28+
"@zig_sdk//platform:linux_arm64",
29+
"@zig_sdk//platform:darwin_amd64",
30+
"@zig_sdk//platform:darwin_arm64",
31+
]
32+
33+
[
34+
platform_transition_filegroup(
35+
name = "EcsactUnrealCodegen-" + platform.split(":")[1],
36+
srcs = [":EcsactUnrealCodegen"],
37+
target_platform = platform,
38+
)
39+
for platform in PLATFORMS
40+
]
41+
42+
filegroup(
43+
name = "AllPlatforms",
44+
srcs = ["EcsactUnrealCodegen-" + platform.split(":")[1] for platform in PLATFORMS],
45+
)

0 commit comments

Comments
 (0)