都改用Xmake

This commit is contained in:
mzx committed 2026-11-17 21:47:13 +08:00
1 parent ec9332826a
commit d8f1e2226d
21 files changed
+355 -561

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
-- ============================================================================
-- 哨兵导航仿真 —— 唯一构建入口
-- ============================================================================
--
-- cd ~/Gazebo_projects/sentry_nav_dev
-- xmake # 编译(产物在 build/linux/x86_64/release/)
-- xmake test # 跑单元测试(85 项,约 5 ms)
-- xmake f -c && xmake # 清掉配置重新编
--
-- 二进制路径:
-- build/linux/x86_64/release/self_filter 点云自滤节点
-- build/linux/x86_64/release/patrol 航点巡逻节点
--
-- ---------------------------------------------------------------------------
-- 为什么 sentry_sim 不在这里
-- ---------------------------------------------------------------------------
-- src/sentry_sim 是**纯数据包**:SDF 世界、STL 网格、YAML 配置、Python 脚本,
-- 一行 C/C++ 源码都没有,没有可编译的东西。它的内容直接原地使用
-- (`scripts/sentry_up.sh` 把 `SENTRY_SIM_SHARE` 指向 `src/sentry_sim` 即可)。
--
-- 同理,本工程**不使用 ament / colcon**,所以没有资源索引注册:
-- 没有 `ros2 run`、没有 `ros2 launch <本工程的包>`、没有 `ros2 pkg prefix`。
-- 节点直接跑上面那两个二进制路径,Python 脚本用 `python3` 直接跑。
-- 代价是**以后要加自定义 .msg / .srv 就必须重新引入 colcon**
-- (xmake 生成不了 ROS 消息的 C++/Python 代码)。
-- ============================================================================
set_project("sentry_nav_dev")
set_version("0.1.0")
set_languages("c++23")
-- clangd / VS Code 的编译数据库自动刷新:每次 xmake build 都重写仓库根的
-- compile_commands.json,编辑器里的红波浪线不会因为数据库过期而误报。
-- 详见 .vscode/README.md。
add_rules("plugin.compile_commands.autoupdate", { outputdir = ".", lsp = "clangd" })
-- 真正的目标都在子目录里(与源码放在一起,加文件时不用来回跳)。
includes("src/sentry_nav")