-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathxmake.lua
More file actions
executable file
·106 lines (91 loc) · 2.33 KB
/
xmake.lua
File metadata and controls
executable file
·106 lines (91 loc) · 2.33 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
set_project("ModelExtras")
add_rules("mode.debug", "mode.releasedbg", "mode.release")
set_defaultmode("debug")
add_rules("plugin.compile_commands.autoupdate", {
outputdir = os.projectdir(),
lsp = "clangd"
})
local PLUGIN_SDK_DIR = os.getenv("PLUGIN_SDK_DIR")
local GAME_DIR = os.getenv("GTASA_DIR")
target("ModelExtras")
set_kind("shared")
set_extension(".asi")
set_languages("c++23")
set_arch("x86")
set_toolchains("clang")
set_plat("mingw")
set_runtimes("static")
set_filename("ModelExtras.asi")
set_pcxxheader("src/pch.h")
add_defines(
"PLUGIN_SGV_10US",
"MODELEXTRAS_DEV",
"GTASA",
"RW"
)
add_includedirs(
"include",
"include/coreutils",
PLUGIN_SDK_DIR,
PLUGIN_SDK_DIR .. "/plugin_sa/",
PLUGIN_SDK_DIR .. "/plugin_sa/game_sa/",
PLUGIN_SDK_DIR .. "/plugin_sa/game_sa/rw/",
PLUGIN_SDK_DIR .. "/shared/",
PLUGIN_SDK_DIR .. "/shared/game/",
PLUGIN_SDK_DIR .. "/injector/",
PLUGIN_SDK_DIR .. "/safetyhook/",
"src/",
"src/features"
)
add_linkdirs(
PLUGIN_SDK_DIR .. "/output/lib"
)
add_files(
"src/**.cpp"
)
add_cxflags(
"--target=i686-w64-mingw32",
"-fpermissive",
"-fcommon",
"-fms-extensions",
"-Wno-invalid-offsetof",
"-Wno-microsoft-include",
"-g",
"-gdwarf-2",
"-fdebug-macro"
)
add_shflags(
"-static",
"-static-libgcc",
"-static-libstdc++",
"-Wl,-Bstatic",
"-lstdc++",
"-lpthread",
"-Wl,-Bdynamic",
"-Wl,--allow-multiple-definition",
"-Wl,--build-id",
{force = true}
)
add_syslinks(
"dwmapi",
"shell32",
"gdi32",
"ntdll",
"user32",
"advapi32"
)
after_build(function (target)
if GAME_DIR then
os.cp(target:targetfile(), GAME_DIR)
print(">> Deployed to Game Directory")
end
end)
if is_mode("debug") then
add_links("plugin_d")
set_optimize("none")
set_symbols('debug')
else
add_links("plugin")
set_optimize("aggressive")
set_symbols('hidden')
end