-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
53 lines (44 loc) · 1.27 KB
/
xmake.lua
File metadata and controls
53 lines (44 loc) · 1.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
target("server")
set_kind("shared")
add_files({
"src/*.cpp",
"src/**/*.cpp",
})
add_files({
"vendor/safetyhook/safetyhook.cpp",
"vendor/safetyhook/Zydis.c"
})
add_includedirs({"vendor", "src"})
set_languages("cxx23")
set_optimize("fastest")
set_symbols("debug")
set_strip("none")
set_runtimes("MT")
if is_plat("windows") then
add_links({
"vendor/s2binlib/s2binlib.lib",
"ntdll",
"kernel32",
})
else
add_links({
"vendor/s2binlib/libs2binlib.a"
})
end
if is_plat("linux") then
add_shflags("-Wl,--exclude-libs,ALL")
end
after_build(function(target)
function GetDistDirName()
if is_plat("windows") then
return "win64"
else
return "linuxsteamrt64"
end
end
if os.exists("build/package") then
os.rmdir("build/package")
end
os.mkdir('build/package/addons/swiftlys2/bin/'..GetDistDirName())
os.cp(target:targetfile(), 'build/package/addons/swiftlys2/bin/'..GetDistDirName().."/"..(is_plat("windows") and "" or "lib").."server."..(is_plat("windows") and "dll" or "so"))
end)