-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
47 lines (39 loc) · 1.07 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
add_rules(
"mode.debug",
"mode.release",
"plugin.vsxmake.autoupdate"
)
set_project("demo")
set_version("0.0.0", {build = "%Y%m%d%H%M%S"})
set_allowedplats("windows", "linux", "freebsd", "switchhb")
set_allowedarchs("switchhb|arm64")
local switch_title_id = "0100694213488000"
includes("support/support.lua")
setup_support(
"support",
path.join("support", "deps"),
not is_plat("switchhb"),
false,
true,
true,
"config.h.in",
switch_title_id
)
target("demo")
set_kind("binary")
add_headerfiles("demo/*.h", "assets/shaders/**")
add_files("demo/*.c")
add_deps("common", "platform", "util")
set_default(true)
support_executable("support")
on_load(fix_target)
before_build(function (target)
target:set("support_data", {
"Demo",
"Randomcode Developers",
switch_title_id
})
if not os.exists(path.join(target:targetdir(), "assets")) then
os.ln(path.absolute(path.join("assets", "out")), path.join(target:targetdir(), "assets"))
end
end)