-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathxmake.lua
38 lines (34 loc) · 926 Bytes
/
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
add_rules("mode.debug", "mode.release")
add_requires("serial")
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"
)
add_packages("serial")
set_warnings("allextra")
add_options("type")
set_basename(get_config("type"))
if(is_mode("debug")) then
add_defines("__DEBUG__")
end