-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathxmake.lua
61 lines (52 loc) · 1.36 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
add_rules("mode.debug", "mode.release")
add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")
add_requires("levilamina 0.13.4")
if not has_config("vs_runtime") then
set_runtimes("MD")
end
option("tests")
set_default(false)
set_showmenu(true)
set_description("Enable tests")
target("more-dimensions")
add_cxflags(
"/EHa",
"/utf-8"
)
add_defines(
"MORE_DIMENSIONS_EXPORTS",
"NOMINMAX",
"UNICODE"
)
add_files(
"src/more_dimensions/**.cpp"
)
add_includedirs(
"src"
)
add_headerfiles(
"src/(more_dimensions/api/**.h)",
"src/(more_dimensions/core/Macros.h)"
)
add_packages(
"levilamina"
)
add_shflags(
"/DELAYLOAD:bedrock_server.dll"
)
set_exceptions("none")
set_kind("shared")
set_symbols("debug")
set_languages("cxx20")
if has_config("tests") then
add_files("src/test/TestCustomDimension.cpp",
"src/test/generator/flat-gen-village/**.cpp")
end
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)