-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathxmake.lua
More file actions
41 lines (37 loc) · 901 Bytes
/
xmake.lua
File metadata and controls
41 lines (37 loc) · 901 Bytes
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
add_rules("mode.debug", "mode.release")
add_requires("serial")
set_toolchains("clang")
option("type")
set_default("infantry")
set_showmenu(true)
set_description("指定要编译的机器人类型")
set_values("infantry", "hero", "sentry")
after_check(function(option)
option:add("defines", "CONFIG_" .. string.upper(option:value()))
option:set("basename", option:value())
end)
target("GKDControl")
set_kind("binary")
set_languages("c++23")
add_files("src/*.cc", "src/**/*.cc")
add_includedirs(
"include",
"include/chassis",
"include/configs",
"include/device",
"include/device/referee",
"include/gimbal",
"include/utils",
"include/logger",
"./include/control",
"./include/robot_controller",
"./include/io",
"./include/shoot"
)
add_packages("serial")
set_warnings("allextra")
add_options("type")
set_basename(get_config("type"))
if is_mode("debug") then
add_defines("__DEBUG__")
end