pimoroni-pico/drivers/sdcard/sdcard.cmake

14 lines
455 B
CMake
Raw Normal View History

2021-05-05 17:32:35 +01:00
if (NOT TARGET sdcard)
add_library(sdcard INTERFACE)
2021-08-03 14:13:53 +01:00
pico_generate_pio_header(sdcard ${CMAKE_CURRENT_LIST_DIR}/spi.pio)
2021-05-05 17:32:35 +01:00
target_sources(sdcard INTERFACE
${CMAKE_CURRENT_LIST_DIR}/sdcard.c
2021-08-03 14:13:53 +01:00
${CMAKE_CURRENT_LIST_DIR}/pio_spi.c
2021-05-05 17:32:35 +01:00
)
2021-08-03 14:13:53 +01:00
target_link_libraries(sdcard INTERFACE fatfs pico_stdlib hardware_clocks hardware_spi hardware_pio)
2021-05-05 17:32:35 +01:00
target_include_directories(sdcard INTERFACE ${CMAKE_CURRENT_LIST_DIR})
endif()