-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
80 lines (74 loc) · 2.27 KB
/
xmake.lua
File metadata and controls
80 lines (74 loc) · 2.27 KB
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
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"
)
option("target_type")
set_default("levilamina")
set_showmenu(true)
set_values(
"levilamina",
"endstone",
"inject"
)
option_end()
if is_config("target_type", "levilamina") then -- levilamina
add_requires("levilamina 1.1.1", {configs = {target_type = "server"}})
add_requires("levibuildscript 0.3.0")
end
if is_config("target_type", "endstone") or is_config("target_type", "inject") then -- inject or endstone
add_requires("glaciehook 1.0.1", { configs = { static = true } })
add_requires("fmt 10.2.1", "libhat 2024.9.22", "detours v4.0.1-xmake.1")
end
if is_config("target_type", "endstone") then -- endstone
add_requires("endstone 0.7.1")
end
if not has_config("vs_runtime") then
set_runtimes("MD")
end
target("FuckHeightLimit")
add_cxflags(
"/EHa",
"/utf-8",
"/W4",
"/w44265",
"/w44289",
"/w44296",
"/w45263",
"/w44738",
"/w45204"
)
add_defines(
"NOMINMAX",
"UNICODE",
"_HAS_CXX23=1"
)
set_exceptions("none")
set_languages("cxx20")
set_symbols("debug")
set_kind("shared")
if is_config("target_type", "levilamina") then -- levilamina
add_packages("levilamina")
add_rules("@levibuildscript/linkrule")
add_rules("@levibuildscript/modpacker")
add_files("src-levi/**.cpp")
before_build(function (target)
os.rm("bin")
end)
end
if is_config("target_type", "endstone") or is_config("target_type", "inject") then -- inject or endstone
add_packages("glaciehook", "libhat", "detours", "fmt", "endstone")
add_files("src-inject/**.cpp")
after_build(function (target)
os.rm("bin")
os.mkdir("bin")
os.cp(target:targetfile(), "bin")
if os.isfile(target:symbolfile()) then
os.cp(target:symbolfile(), "bin")
end
end)
end
if is_config("target_type", "endstone") then -- endstone
add_packages("endstone")
add_files("src-es/**.cpp")
end