mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 03:33:33 +08:00
mavlink: cmake generate mavlink headers at build time
- mavlink/mavlink is now directly included as a submodule instead of the generated mavlink/c_library_v2 - this also switches to mavlink development.xml by default
This commit is contained in:
@@ -55,12 +55,13 @@ px4_add_module(
|
||||
-Wno-cast-align
|
||||
-Wno-address-of-packed-member # TODO: fix in c_library_v2
|
||||
INCLUDES
|
||||
${PX4_SOURCE_DIR}/mavlink/include/mavlink
|
||||
${CMAKE_BINARY_DIR}/mavlink
|
||||
${CMAKE_BINARY_DIR}/mavlink/development
|
||||
SRCS
|
||||
simulator.cpp
|
||||
simulator_mavlink.cpp
|
||||
DEPENDS
|
||||
git_mavlink_v2
|
||||
mavlink_c_generate
|
||||
conversion
|
||||
geo
|
||||
drivers_accelerometer
|
||||
@@ -68,6 +69,6 @@ px4_add_module(
|
||||
drivers_gyroscope
|
||||
drivers_magnetometer
|
||||
)
|
||||
target_include_directories(modules__simulator INTERFACE ${PX4_SOURCE_DIR}/mavlink/include/mavlink)
|
||||
target_include_directories(modules__simulator INTERFACE ${CMAKE_BINARY_DIR}/mavlink)
|
||||
|
||||
add_subdirectory(battery_simulator)
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
|
||||
#include <random>
|
||||
|
||||
#include <v2.0/common/mavlink.h>
|
||||
#include <v2.0/mavlink_types.h>
|
||||
#include <mavlink.h>
|
||||
#include <mavlink_types.h>
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user