[9XR-PRO] CMake error when Mike's bootloader is not correctly downloaded

This commit is contained in:
Bertrand Songis
2016-11-13 20:28:29 +01:00
parent 6b57f7afa7
commit 26a35ebcee
+6 -1
View File
@@ -376,7 +376,12 @@ if(NOT MSVC)
set(FIRMWARE_DEPENDENCIES ${FIRMWARE_DEPENDENCIES} bootloader)
else()
# We fetch Mike's bootloader as it is not included inside OpenTX
file(DOWNLOAD https://github.com/MikeBland/OpenRcBootloader/releases/download/V1.9/${BOOTLOADER} ${CMAKE_CURRENT_BINARY_DIR}/bootloader.lbm)
message(STATUS "Downloading Mike's bootloader: https://github.com/MikeBland/OpenRcBootloader/releases/download/V1.9/${BOOTLOADER}")
file(DOWNLOAD https://github.com/MikeBland/OpenRcBootloader/releases/download/V1.9/${BOOTLOADER} ${CMAKE_CURRENT_BINARY_DIR}/bootloader.lbm STATUS status)
list(GET status 0 error_code)
if(error_code)
message(FATAL_ERROR "Failed to download Mike's bootloader: ${status}")
endif()
endif()
add_executable(firmware ${SRC} ${FIRMWARE_HEADERS})