diff --git a/ArduCopter/CMakeLists.txt b/ArduCopter/CMakeLists.txt index 78dedcb342..ba540e183c 100644 --- a/ArduCopter/CMakeLists.txt +++ b/ArduCopter/CMakeLists.txt @@ -22,12 +22,18 @@ project(ArduCopter C CXX) find_package(Arduino 22 REQUIRED) +if (NOT DEFINED BOARD) + message(STATUS "board not defined, assuming mega, use cmake -DBOARD=mega2560 , etc. to specify") + set(BOARD "mega") +endif() +message(STATUS "Board configured as: ${BOARD}") + add_subdirectory(../libraries "${CMAKE_CURRENT_BINARY_DIR}/libs") #add_subdirectory(${CMAKE_SOURCE_DIR}/ArduCopter) #add_subdirectory(testtool) -PRINT_BOARD_SETTINGS(mega2560) +PRINT_BOARD_SETTINGS(${BOARD}) diff --git a/ArduCopter/Makefile b/ArduCopter/Makefile deleted file mode 100644 index 34f8baffd9..0000000000 --- a/ArduCopter/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# -# Trivial makefile for building APM -# - -# -# Select 'mega' for the original APM, or 'mega2560' for the V2 APM. -# -BOARD = mega - -include ../libraries/AP_Common/Arduino.mk