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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user