CMakeLists.txt 837 B

1234567891011121314151617181920212223
  1. idf_build_get_property(target IDF_TARGET)
  2. list(APPEND srcs "spiffs_api.c"
  3. "spiffs/src/spiffs_cache.c"
  4. "spiffs/src/spiffs_check.c"
  5. "spiffs/src/spiffs_gc.c"
  6. "spiffs/src/spiffs_hydrogen.c"
  7. "spiffs/src/spiffs_nucleus.c")
  8. if(NOT ${target} STREQUAL "linux")
  9. list(APPEND pr bootloader_support esptool_py vfs)
  10. list(APPEND srcs "esp_spiffs.c")
  11. endif()
  12. idf_component_register(SRCS ${srcs}
  13. INCLUDE_DIRS "include"
  14. PRIV_INCLUDE_DIRS "." "spiffs/src"
  15. REQUIRES esp_partition
  16. PRIV_REQUIRES ${pr} spi_flash)
  17. if(CMAKE_C_COMPILER_ID MATCHES "GNU")
  18. set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation)
  19. endif()