1.注释掉mavlink自动编译
2.替换修改后的自定义消息
3.生成makefile
cmake -Bmavlink-build -S mavlink -DMAVLINK_DIALECT=all -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/Desktop/MAVSDK/build/android-arm64/third_party/install/
4.编译与安装
cmake --build mavlink-build && cmake --install mavlink-build --config Debug
为了操作方便,写成shell脚本