Browse Source

cmake handle mavlink v1 submodule only where used

sbg
Daniel Agar 7 years ago
parent
commit
32cba41bed
  1. 5
      src/drivers/pwm_out_rc_in/CMakeLists.txt
  2. 5
      src/drivers/snapdragon_rc_pwm/CMakeLists.txt
  3. 6
      src/modules/mavlink/CMakeLists.txt
  4. 5
      src/modules/simulator/CMakeLists.txt

5
src/drivers/pwm_out_rc_in/CMakeLists.txt

@ -31,16 +31,19 @@
# #
############################################################################ ############################################################################
include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) px4_add_git_submodule(TARGET git_mavlink_v1 PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v1.0")
px4_add_module( px4_add_module(
MODULE drivers__pwm_out_rc_in MODULE drivers__pwm_out_rc_in
MAIN pwm_out_rc_in MAIN pwm_out_rc_in
INCLUDES
${PX4_SOURCE_DIR}/mavlink/include/mavlink
COMPILE_FLAGS COMPILE_FLAGS
-DMAVLINK_COMM_NUM_BUFFERS=1 -DMAVLINK_COMM_NUM_BUFFERS=1
SRCS SRCS
pwm_out_rc_in.cpp pwm_out_rc_in.cpp
DEPENDS DEPENDS
git_mavlink_v1
platforms__common platforms__common
) )
# vim: set noet ft=cmake fenc=utf-8 ff=unix : # vim: set noet ft=cmake fenc=utf-8 ff=unix :

5
src/drivers/snapdragon_rc_pwm/CMakeLists.txt

@ -31,16 +31,19 @@
# #
############################################################################ ############################################################################
include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) px4_add_git_submodule(TARGET git_mavlink_v1 PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v1.0")
px4_add_module( px4_add_module(
MODULE drivers__snapdragon_rc_pwm MODULE drivers__snapdragon_rc_pwm
MAIN snapdragon_rc_pwm MAIN snapdragon_rc_pwm
COMPILE_FLAGS COMPILE_FLAGS
-DMAVLINK_COMM_NUM_BUFFERS=1 -DMAVLINK_COMM_NUM_BUFFERS=1
INCLUDES
${PX4_SOURCE_DIR}/mavlink/include/mavlink
SRCS SRCS
snapdragon_rc_pwm.cpp snapdragon_rc_pwm.cpp
DEPENDS DEPENDS
git_mavlink_v1
platforms__common platforms__common
) )
# vim: set noet ft=cmake fenc=utf-8 ff=unix : # vim: set noet ft=cmake fenc=utf-8 ff=unix :

6
src/modules/mavlink/CMakeLists.txt

@ -31,8 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_git_submodule(TARGET git_mavlink PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v1.0") px4_add_git_submodule(TARGET git_mavlink_v2 PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v2.0")
px4_add_git_submodule(TARGET git_mavlink2 PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v2.0")
px4_add_module( px4_add_module(
MODULE modules__mavlink MODULE modules__mavlink
@ -61,6 +60,5 @@ px4_add_module(
mavlink_ulog.cpp mavlink_ulog.cpp
DEPENDS DEPENDS
platforms__common platforms__common
git_mavlink git_mavlink_v2
git_mavlink2
) )

5
src/modules/simulator/CMakeLists.txt

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) px4_add_git_submodule(TARGET git_mavlink_v1 PATH "${PX4_SOURCE_DIR}/mavlink/include/mavlink/v1.0")
option(ENABLE_UART_RC_INPUT "Enable RC Input from UART mavlink connection" OFF) option(ENABLE_UART_RC_INPUT "Enable RC Input from UART mavlink connection" OFF)
@ -59,8 +59,11 @@ px4_add_module(
MODULE modules__simulator MODULE modules__simulator
MAIN simulator MAIN simulator
COMPILE_FLAGS COMPILE_FLAGS
INCLUDES
${PX4_SOURCE_DIR}/mavlink/include/mavlink
SRCS SRCS
${SIMULATOR_SRCS} ${SIMULATOR_SRCS}
DEPENDS DEPENDS
git_mavlink_v1
platforms__common platforms__common
) )

Loading…
Cancel
Save