CMakeLists.txt 1019 B

12345678910111213141516171819202122232425262728293031323334
  1. idf_build_get_property(target IDF_TARGET)
  2. set(srcs "diskio/diskio.c"
  3. "diskio/diskio_rawflash.c"
  4. "diskio/diskio_wl.c"
  5. "src/ff.c"
  6. "src/ffunicode.c")
  7. set(include_dirs "diskio" "src")
  8. set(requires "wear_levelling")
  9. # for linux, we do not have support for vfs and sdmmc, for real targets, add respective sources
  10. if(${target} STREQUAL "linux")
  11. list(APPEND srcs "port/linux/ffsystem.c")
  12. else()
  13. list(APPEND srcs "port/freertos/ffsystem.c"
  14. "diskio/diskio_sdmmc.c"
  15. "vfs/vfs_fat.c"
  16. "vfs/vfs_fat_sdmmc.c"
  17. "vfs/vfs_fat_spiflash.c")
  18. list(APPEND include_dirs "vfs")
  19. list(APPEND requires "sdmmc" "driver") # `driver` will be replaced with `esp_driver_sdspi`
  20. list(APPEND priv_requires "vfs" "esp_driver_gpio")
  21. endif()
  22. idf_component_register(SRCS ${srcs}
  23. INCLUDE_DIRS ${include_dirs}
  24. REQUIRES ${requires}
  25. PRIV_REQUIRES ${priv_requires}
  26. )