-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
103 lines (83 loc) · 3.11 KB
/
xmake.lua
File metadata and controls
103 lines (83 loc) · 3.11 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
98
99
100
101
102
103
add_rules("mode.debug", "mode.release", "mode.releasedbg")
set_languages("c++latest")
set_warnings("allextra", "error")
set_symbols("hidden")
if is_mode("release") then
set_optimize("fastest")
elseif is_mode("debug") then
set_symbols("debug", "hidden")
add_cxflags("-fno-omit-frame-pointer", { tools = { "clang", "gcc" } })
add_cxflags("-fstandalone-debug", { tools = { "clang", "gcc" } })
add_cxflags("-glldb", { tools = { "clang", "gcc" } })
-- add_mxflags("-glldb", { tools = { "clang", "gcc" } })
elseif is_mode("releasedbg") then
set_optimize("fast")
set_symbols("debug", "hidden")
add_cxflags("-fno-omit-frame-pointer", { tools = { "clang", "gcc" } })
-- add_mxflags("-glldb", { tools = { "clang", "gcc" } })
end
add_repositories("tapzcrew-repo https://github.com/tapzcrew/xmake-repo main")
add_requires("glm 1.0.1", "frozen")
-- stormkit deps, remove when handled by xmake
add_requires("unordered_dense", "tl_function_ref", "cpptrace")
add_requires("stormkit", {
version = "20260206",
configs = {
entities = false,
lua = false,
gpu = true,
shared = false,
-- debug = is_mode("debug"),
},
})
add_defines("PUGIXML_USE_STD_MODULE")
-- TODO disable unused exceptions and edit code accordingly
-- add_defines("PUGIXML_NO_EXCEPTIONS")
add_requires("pugixml", "ftxui main")
add_requires("imgui", {
configs = {
vulkan = true,
debug = is_mode("debug"),
cxxflags = { "-DIMGUI_IMPL_VULKAN_NO_PROTOTYPES" },
},
})
add_requireconfs("pugixml", "cpptrace", { system = false })
-- if is_mode("debug") then
-- add_defines("_LIBCPP_DEBUG")
-- add_requireconfs(
-- "ftxui",
-- { debug = true }
-- )
-- end
add_requireconfs("ftxui", { system = false, configs = { modules = true } })
add_requireconfs("glm", { system = false, configs = { modules = true } })
add_requireconfs("pugixml", { system = false, configs = { modules = true } })
add_requireconfs("frozen", { configs = { modules = true, std_import = true, cpp = "latest" } })
add_requireconfs("unordered_dense", { configs = { modules = true, std_import = true } })
add_requireconfs("tl_function_ref", { configs = { modules = true, std_import = true } })
add_cxxflags("-fexperimental-library")
add_ldflags("-fexperimental-library")
option("compile_commands", { default = true, category = "root menu/support" })
if get_config("compile_commands") then
add_rules("plugin.compile_commands.autoupdate", { outputdir = ".vscode", lsp = "clangd" })
end
target("markovjunior")
set_kind("binary")
add_packages("stormkit", { components = { "core", "log", "wsi", "gpu", "image" } })
-- stormkit deps, remove when handled by xmake
add_packages(
"glm",
"frozen",
-- stormkit deps, remove when handled by xmake
"unordered_dense",
"tl_function_ref",
"cpptrace",
"pugixml",
"ftxui",
"imgui"
)
add_files("lib/**.mpp", "src/**.mpp", "src/**.cpp")
set_rundir("$(projectdir)")
if is_plat("macosx") then
add_frameworks("Foundation", "AppKit", "Metal", "IOKit", "QuartzCore")
end