From fe1e3727a9737672bcd7e019458c410363c4bee6 Mon Sep 17 00:00:00 2001 From: Mindaugas Vinkelis Date: Fri, 8 Dec 2017 08:15:18 +0200 Subject: [PATCH] fixed arduino library includes --- cmake/Platform/Core/Libraries/ArduinoLibraryFactory.cmake | 1 + cmake/Platform/Core/LibraryFinder.cmake | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cmake/Platform/Core/Libraries/ArduinoLibraryFactory.cmake b/cmake/Platform/Core/Libraries/ArduinoLibraryFactory.cmake index 0878707..2420209 100644 --- a/cmake/Platform/Core/Libraries/ArduinoLibraryFactory.cmake +++ b/cmake/Platform/Core/Libraries/ArduinoLibraryFactory.cmake @@ -68,6 +68,7 @@ function(make_arduino_library VAR_NAME BOARD_ID LIB_PATH COMPILE_FLAGS LINK_FLAG else () # Target already exists, skiping creating list(APPEND LIB_TARGETS ${TARGET_LIB_NAME}) + list(APPEND LIB_INCLUDES "-I\"${LIB_PATH}\"") endif () if (LIB_TARGETS) diff --git a/cmake/Platform/Core/LibraryFinder.cmake b/cmake/Platform/Core/LibraryFinder.cmake index 5425bc3..62fca6e 100644 --- a/cmake/Platform/Core/LibraryFinder.cmake +++ b/cmake/Platform/Core/LibraryFinder.cmake @@ -102,20 +102,12 @@ function(find_arduino_libraries VAR_NAME SRCS ARDLIBS) list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}/${INCLUDE_NAME}) break() endif () - if (EXISTS ${LIB_SEARCH_PATH}/${CMAKE_MATCH_1}) - list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}) - break() - endif () # Some libraries like Wire and SPI require building from source if (EXISTS ${LIB_SEARCH_PATH}/${INCLUDE_NAME}/src/${CMAKE_MATCH_1}) list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}/${INCLUDE_NAME}/src) break() endif () - if (EXISTS ${LIB_SEARCH_PATH}/src/${CMAKE_MATCH_1}) - list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}/src) - break() - endif () endforeach () endif ()