-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
46 lines (39 loc) · 1.25 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
add_rules("mode.debug", "mode.release")
add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")
add_requires("levilamina")
if not has_config("vs_runtime") then
set_runtimes("MD")
end
target("change-this") -- Change this to your plugin name.
add_cxflags(
"/EHa", -- To catch both structured (asynchronous) and standard C++ (synchronous) exceptions.
"/utf-8" -- To enable UTF-8 source code.
)
add_defines(
"NOMINMAX", -- To avoid conflicts with std::min and std::max.
"UNICODE" -- To enable Unicode support in Windows API.
)
add_files(
"src/**.cpp"
)
add_includedirs(
"src"
)
add_packages(
"levilamina"
)
add_shflags(
"/DELAYLOAD:bedrock_server.dll" -- To use forged symbols of SymbolProvider.
)
set_exceptions("none") -- To avoid conflicts with /EHa.
set_kind("shared")
set_languages("cxx20")
set_symbols("debug")
after_build(function (target)
local plugin_packer = import("scripts.after_build")
local plugin_define = {
pluginName = target:name(),
pluginFile = path.filename(target:targetfile()),
}
plugin_packer.pack_plugin(target,plugin_define)
end)