Replace thirdparty/GCS_MAVLink with a git submodule (#4556)

* Replace thirdparty/GCS_MAVLink with a git submodule

* Try to recover from missing submodules
This commit is contained in:
alteman
2017-03-05 13:04:52 +01:00
committed by Bertrand Songis
parent 2af7751caa
commit cd6eef2cfa
224 changed files with 15 additions and 89521 deletions
@@ -83,6 +83,17 @@ elseif(TELEMETRY STREQUAL JETI)
elseif(TELEMETRY STREQUAL MAVLINK)
add_definitions(-DTELEMETRY_MAVLINK)
include_directories(${THIRDPARTY_DIR} gui/${GUI_DIR} targets/common/avr)
if(NOT EXISTS ${THIRDPARTY_DIR}/GCS_MAVLink/include_v1.0/mavlink_types.h)
message(WARNING "Warning: ${THIRDPARTY_DIR}/GCS_MAVLink/include_v1.0 is empty, trying to clone submodules")
execute_process(COMMAND git submodule update --init
RESULT_VARIABLE GIT_SUBMODULE_RESULT
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
if(NOT ${GIT_SUBMODULE_RESULT} EQUAL 0)
message(FATAL_ERROR "Error: Cannot clone submodule at ${THIRDPARTY_DIR}/GCS_MAVLink/include_v1.0
If you downloaded this project as a ZIP file, please instead run
'git clone --recursive https://github.com/opentx/opentx.git'")
endif()
endif()
set(FIRMWARE_SRC
${FIRMWARE_SRC}
targets/common/avr/telemetry_driver.cpp