Repository navigation
Expand file tree
/
Copy pathxmake.lua
More file actions
97 lines (88 loc) · 2.88 KB
/
Copy pathxmake.lua
File metadata and controls
97 lines (88 loc) · 2.88 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
set_xmakever("2.9.2")
-- description scope extensions
includes("xmake/skr_desc_ext.lua")
-- global configs
skr_env_set("engine_dir", os.scriptdir())
default_unity_batch = 16
-- setup xmake extensions
add_moduledirs("xmake/modules")
add_plugindirs("xmake/plugins")
add_repositories("skr-xrepo xrepo", {rootdir = os.scriptdir()})
includes("xmake/options.lua")
includes("xmake/compile_flags.lua")
includes("xmake/rules.lua")
-- global configs
skr_global_config()
-- add global rules to all targets
-- add_rules("DisableTargets")
-- load project configs
if not disable_project_config then
if os.exists("project.lua") then
includes("project.lua")
else
includes("./xmake/project.default.lua")
end
end
-- global install tools
skr_global_target()
-- global install tool
-- skr_install("download", {
-- name = "python-embed-3.13.1",
-- install_func = "tool",
-- plat = {"windows"},
-- after_install = function()
-- import("skr.utils")
-- local python = utils.find_python()
-- -- os.execv(python, {"-m", "pip", "install", "mako"})
-- os.execv(python, {"-m", "pip", "install", "autopep8"})
-- end
-- })
-- skr_install("custom", {
-- name = "system python",
-- plat = {"macosx", "linux"},
-- func = function ()
-- import("skr.utils")
-- local python = utils.find_python()
-- if python then
-- -- os.execv(python, {"-m", "pip", "install", "mako"})
-- os.execv(python, {"-m", "pip", "install", "autopep8"})
-- else
-- raise("python not found, please install python3 first")
-- end
-- end
-- })
skr_install("download", {
name = "bun_1.2.5",
install_func = "tool",
plat = {"windows"},
after_install = function()
import("skr.utils")
local bun = utils.find_bun()
-- os.execv(bun, {"install", "--production"}, {curdir = path.join(utils.get_env("engine_dir"), "tools/meta_codegen_ts")})
os.execv(bun, {"install"}, {curdir = path.join(utils.get_env("engine_dir"), "tools/meta_codegen_ts")})
os.execv(bun, {"install"}, {curdir = path.join(utils.get_env("engine_dir"), "tools/merge_natvis_ts")})
end
})
skr_install("download", {
name = "meta_v1.0.3-llvm_19.1.7",
install_func = "tool",
})
skr_install("download", {
name = "tracy-gui-0.10.1a",
install_func = "tool",
arch = {"x64", "x86", "x86_64"} -- TODO. support arm64
})
skr_global_target_end()
-- modules
includes("thirdparty")
includes("modules")
skr_includes_with_cull("samples", function ()
includes("samples")
end)
skr_includes_with_cull("tests", function ()
includes("tests")
end)
-- commit env
if not skr_env_is_committed() then
skr_env_commit()
end