forked from tiltedphoques/TiltedEvolution
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
85 lines (76 loc) · 2.47 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
75
76
77
78
79
80
81
82
83
84
85
local function build_client(name, def)
target(name)
set_kind("static")
set_group("Client")
add_defines(def)
add_includedirs(".")
set_pcxxheader("TiltedOnlinePCH.h")
-- exclude game specifc stuff
add_headerfiles("**.h|Games/Fallout4/**|Games/Skyrim/**|Services/Vivox/**")
add_files("**.cpp|Games/Fallout4/**|Games/Skyrim/**|Services/Vivox/**")
after_install(function(target)
local linkdir = target:pkg("cef"):get("linkdirs")
local bindir = path.join(linkdir, "..", "bin")
local uidir = path.join(target:scriptdir(), "..", "skyrim_ui", "src")
os.cp(bindir, target:installdir())
os.cp(path.join(uidir, "assets", "images", "cursor.dds"), path.join(target:installdir(), "bin", "assets", "images", "cursor.dds"))
os.cp(path.join(uidir, "assets", "images", "cursor.png"), path.join(target:installdir(), "bin", "assets", "images", "cursor.png"))
os.rm(path.join(target:installdir(), "bin", "**Tests.exe"))
end)
-- only include selected files
if name == "SkyrimTogetherClient" then
add_files("Games/Skyrim/**.cpp")
add_headerfiles("Games/Skyrim/**.h")
-- rather hacky:
add_includedirs("Games/Skyrim")
add_deps("SkyrimEncoding")
end
if name == "FalloutTogetherClient" then
add_files("Games/Fallout4/**.cpp")
add_headerfiles("Games/Fallout4/**.h")
-- rather hacky:
add_includedirs("Games/Fallout4")
add_deps("FalloutEncoding")
end
add_deps(
"UiProcess",
"CommonLib",
"BaseLib",
"ImGuiImpl",
"TiltedConnect",
"TiltedReverse",
"TiltedHooks",
"TiltedUi",
{inherit = true}
)
add_packages(
"tiltedcore",
"spdlog",
"hopscotch-map",
"cryptopp",
"gamenetworkingsockets",
"discord",
"imgui",
"cef",
"minhook",
"entt",
"glm",
"mem",
"xbyak")
if has_config("vivox") then
add_files("Services/Vivox/**.cpp")
add_headerfiles("Services/Vivox/**.h")
add_includedirs("Services/Vivox")
add_deps("Vivox")
add_defines("TP_VIVOX=1")
else
add_defines("TP_VIVOX=0")
end
add_syslinks(
"version",
"dbghelp",
"kernel32")
end
add_requires("tiltedcore v0.2.7", {debug = true})
build_client("SkyrimTogetherClient", "TP_SKYRIM=1")
build_client("FalloutTogetherClient", "TP_FALLOUT=1")