mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 22:33:34 +08:00
cmake handle git submodule depdencies
This commit is contained in:
@@ -43,4 +43,3 @@ px4_add_module(
|
||||
platforms__common
|
||||
git_ecl
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink)
|
||||
px4_add_git_submodule(TARGET git_mavlink PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v1.0")
|
||||
px4_add_git_submodule(TARGET git_mavlink2 PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v2.0")
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__mavlink
|
||||
@@ -41,6 +42,8 @@ px4_add_module(
|
||||
COMPILE_FLAGS
|
||||
-Wno-extra-semi
|
||||
-Wno-sign-compare # TODO: fix all sign-compare
|
||||
INCLUDES
|
||||
${PX4_SOURCE_DIR}/mavlink/include/mavlink
|
||||
SRCS
|
||||
mavlink.c
|
||||
mavlink_command_sender.cpp
|
||||
@@ -58,5 +61,6 @@ px4_add_module(
|
||||
mavlink_ulog.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
git_mavlink
|
||||
git_mavlink2
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -63,8 +63,4 @@ px4_add_module(
|
||||
${SIMULATOR_SRCS}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
git_jmavsim
|
||||
git_gazebo
|
||||
)
|
||||
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_git_submodule(TARGET git_uavcan PATH "libuavcan")
|
||||
|
||||
set(UAVCAN_USE_CPP03 ON CACHE BOOL "uavcan cpp03")
|
||||
set(UAVCAN_PLATFORM stm32 CACHE STRING "uavcan platform")
|
||||
|
||||
@@ -50,20 +52,19 @@ add_definitions(
|
||||
)
|
||||
|
||||
add_subdirectory(libuavcan EXCLUDE_FROM_ALL)
|
||||
add_dependencies(uavcan platforms__nuttx)
|
||||
|
||||
include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink)
|
||||
include_directories(libuavcan/libuavcan/include)
|
||||
include_directories(libuavcan/libuavcan/include/dsdlc_generated)
|
||||
include_directories(libuavcan/libuavcan_drivers/posix/include)
|
||||
include_directories(libuavcan/libuavcan_drivers/stm32/driver/include)
|
||||
add_dependencies(uavcan prebuild_targets)
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__uavcan
|
||||
MAIN uavcan
|
||||
STACK_MAIN 3200
|
||||
STACK_MAX 1500
|
||||
COMPILE_FLAGS
|
||||
INCLUDES
|
||||
${PX4_SOURCE_DIR}/mavlink/include/mavlink
|
||||
libuavcan/libuavcan/include
|
||||
libuavcan/libuavcan/include/dsdlc_generated
|
||||
libuavcan/libuavcan_drivers/posix/include
|
||||
libuavcan/libuavcan_drivers/stm32/driver/include
|
||||
SRCS
|
||||
# Main
|
||||
uavcan_main.cpp
|
||||
@@ -81,8 +82,10 @@ px4_add_module(
|
||||
sensors/baro.cpp
|
||||
|
||||
DEPENDS
|
||||
git_uavcan
|
||||
platforms__common
|
||||
uavcan
|
||||
uavcan_stm32_driver
|
||||
)
|
||||
|
||||
target_link_libraries(modules__uavcan uavcan uavcan_stm32_driver)
|
||||
|
||||
Reference in New Issue
Block a user