-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxmake.lua
94 lines (71 loc) · 1.86 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
86
87
88
89
90
91
92
93
94
--add_requires("wxwidgets 3.2.0")
add_requires("minhook")
--add_requires("wxwidgets 3.2.4", {configs = {shared = false}})
includes("ews_lib")
includes("game_lua")
includes("test_env")
includes("version_proxy")
includes("tools/exepatcher")
includes("wxWidgetsPackage.lua")
includes("Dependencies/HashlistLib/xmake.lua")
local arch = "x86"
x86_games = {
"PDTH",
"PD2"
}
x64_games = {
"RAIDWW2"
}
set_runtimes("MD")
games = {}
if arch == "x64" then
games = x64_games
else
games = x86_games
end
games = {
"PDTH",
"PD2",
"RAIDWW2"
}
for _, game in ipairs(games) do
target("EWS-"..game)
set_kind("shared")
set_languages("cxx20")
set_exceptions("cxx")
set_symbols("debug")
--add_packages("wxwidgets")
add_packages("minhook")
--add_defines("__WXMSW__", "WXUSINGDLL")
add_defines("GAME")
add_files(get_ews_source_files())
add_headerfiles(get_ews_header_files())
add_includedirs(get_ews_include_path())
add_headerfiles(path.join(os.projectdir(), "EWS.natvis"), path.join(os.projectdir(), ".editorconfig"))
add_includedirs(path.join(os.projectdir(), "Dependencies/HashlistLib/include"))
add_deps("HashlistLib")
if game == "RAIDWW2" then
add_files("./game_cpp/raidww2/src/main.cpp")
add_deps("game_lua_raid")
add_defines("WIN64")
add_wxwidgets("x64")
set_arch("x64")
end
if game == "PDTH" then
add_files("./game_cpp/pdth/src/main.cpp")
add_deps("game_lua_pdth")
add_wxwidgets("x86")
set_arch("x86")
end
if game == "PD2" then
add_files("./game_cpp/pd2/src/main.cpp")
add_deps("game_lua_pd2")
add_wxwidgets("x86")
set_arch("x86")
end
add_files("./Dependencies/wxWidgets/include/wx/msw/wx.rc")
add_includedirs(path.join(os.projectdir(), "game_lua/include"))
add_includedirs(path.join(os.projectdir(), "ews_lib/src"))
add_ldflags("/SUBSYSTEM:WINDOWS", {force = true})
target_end()
end