Skip to content

Commit b77542e

Browse files
Fix SPI hardware library detection
1 parent 8d19e10 commit b77542e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmake/Platform/Arduino.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,16 @@ function(find_arduino_libraries VAR_NAME SRCS ARDLIBS)
945945
list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH})
946946
break()
947947
endif()
948+
949+
# Some libraries like Wire and SPI require building from source
950+
if(EXISTS ${LIB_SEARCH_PATH}/${INCLUDE_NAME}/src/${CMAKE_MATCH_1})
951+
list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}/${INCLUDE_NAME}/src)
952+
break()
953+
endif()
954+
if(EXISTS ${LIB_SEARCH_PATH}/${CMAKE_MATCH_1}/src)
955+
list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}/src)
956+
break()
957+
endif()
948958
endforeach()
949959
endif()
950960
endforeach()

0 commit comments

Comments
 (0)