generated from ZMBlocks/ES-Example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
74 lines (62 loc) · 1.69 KB
/
xmake.lua
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
add_rules("mode.debug", "mode.release")
add_repositories(
"liteldev-repo https://github.com/LiteLDev/xmake-repo.git",
"groupmountain-repo https://github.com/GroupMountain/xmake-repo.git"
)
add_requires("glaciehook 1.0.1", { configs = { static = true } })
add_requires(
"endstone 0.6.1",
"fmt >=10.0.0 <11.0.0",
"expected-lite 0.8.0",
"libhat 2024.9.22",
"detours v4.0.1-xmake.1"
)
if not has_config("vs_runtime") then
set_runtimes("MD")
end
target("ChunkLeakFix")
add_defines(
"NOMINMAX",
"UNICODE",
"_HAS_CXX23=1"
)
add_packages(
"endstone",
"fmt",
"expected-lite",
"libhat",
"detours",
"glaciehook"
)
set_kind("shared")
set_languages("cxx20")
set_symbols("debug")
add_includedirs("src")
add_files("src/**.cpp")
-- EndStone Entt
add_defines("ENTT_SPARSE_PAGE=2048")
add_defines("ENTT_PACKED_PAGE=128")
add_cxxflags("/Zc:__cplusplus")
add_cxflags(
"/EHa",
"/utf-8",
-- "/W4",
"/sdl"
)
if is_mode("debug") then
add_defines("DEBUG")
elseif is_mode("release") then
add_defines("NDEBUG")
end
after_build(function(target)
local output_dir = path.join(os.projectdir(), "bin")
os.cp(
target:targetfile(),
path.join(output_dir, target:name() .. ".dll")
)
local pdb_path = path.join(output_dir, target:name() .. ".pdb")
if os.isfile(target:symbolfile()) then
os.cp(target:symbolfile(), pdb_path)
end
cprint("${bright green}[plugin Packer]: ${reset}plugin already generated to " .. output_dir)
end)