forked from SakuraEngine/SakuraEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
60 lines (48 loc) · 1.51 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
set_xmakever("2.8.1")
set_project("SakuraEngine")
set_policy("build.ccache", false)
set_policy("check.auto_ignore_flags", false)
add_rules("plugin.compile_commands.autoupdate", { outputdir = ".vscode" }) -- xmake 2.7.4
add_moduledirs("xmake/modules")
add_plugindirs("xmake/plugins")
add_repositories("skr-xrepo xrepo", {rootdir = os.scriptdir()})
set_languages(get_config("cxx_version"), get_config("c_version"))
add_rules("mode.debug", "mode.release", "mode.releasedbg", "mode.asan")
includes("xmake/options.lua")
--includes("xmake/toolchains/prospero.lua")
engine_version = "0.1.0"
default_unity_batch_size = 16
includes("xmake/compile_flags.lua")
includes("xmake/rules.lua")
if (is_os("windows")) then
add_defines("UNICODE", "NOMINMAX", "_WINDOWS")
add_defines("_GAMING_DESKTOP")
add_defines("_CRT_SECURE_NO_WARNINGS")
if (is_mode("release")) then
set_runtimes("MD")
elseif (is_mode("asan")) then
add_defines("_DISABLE_VECTOR_ANNOTATION")
else
set_runtimes("MDd")
end
elseif (is_os("macosx") or is_os("linux")) then
add_requires("libsdl")
else
-- ...
end
includes("xmake/thirdparty.lua")
includes("tools/codegen/xmake.lua")
set_warnings("all")
includes("modules/xmake.lua")
if(has_config("build_samples")) then
includes("samples/xmake.lua")
end
if(has_config("build_tools")) then
includes("tools/xmake.lua")
end
if(has_config("build_editors")) then
includes("editors/xmake.lua")
end
if(has_config("build_tests")) then
includes("tests/xmake.lua")
end