diff --git a/cmake/modules/FindArduino.cmake b/cmake/modules/FindArduino.cmake index 7faadeba15..a8cc4ae63e 100644 --- a/cmake/modules/FindArduino.cmake +++ b/cmake/modules/FindArduino.cmake @@ -288,6 +288,7 @@ function(setup_arduino_core VAR_NAME BOARD_ID) if(BOARD_CORE AND NOT TARGET ${CORE_LIB_NAME}) set(BOARD_CORE_PATH ${ARDUINO_CORES_PATH}/${BOARD_CORE}) find_sources(CORE_SRCS ${BOARD_CORE_PATH}) + list(REMOVE_ITEM CORE_SRCS "${BOARD_CORE_PATH}/main.cxx") add_library(${CORE_LIB_NAME} ${CORE_SRCS}) set(${VAR_NAME} ${CORE_LIB_NAME} PARENT_SCOPE) endif()