CMakeLists.txt 1.0 KB

123456789101112131415161718192021222324252627282930
  1. # SPDX-License-Identifier: Apache-2.0
  2. if(CONFIG_FILE_SYSTEM)
  3. zephyr_interface_library_named(FS)
  4. zephyr_library()
  5. zephyr_library_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  6. zephyr_library_sources(fs.c fs_impl.c)
  7. zephyr_library_sources_ifdef(CONFIG_FAT_FILESYSTEM_ELM fat_fs.c)
  8. zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_LITTLEFS littlefs_fs.c)
  9. zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_SHELL shell.c)
  10. zephyr_library_link_libraries(FS)
  11. target_link_libraries_ifdef(CONFIG_FAT_FILESYSTEM_ELM FS INTERFACE ELMFAT)
  12. target_link_libraries_ifdef(CONFIG_FILE_SYSTEM_LITTLEFS FS INTERFACE LITTLEFS)
  13. endif()
  14. add_subdirectory_ifdef(CONFIG_FCB ./fcb)
  15. add_subdirectory_ifdef(CONFIG_NVS ./nvs)
  16. if(CONFIG_FUSE_FS_ACCESS)
  17. zephyr_library_named(FS_FUSE)
  18. find_package(PkgConfig REQUIRED)
  19. pkg_search_module(FUSE REQUIRED fuse)
  20. zephyr_include_directories(${FUSE_INCLUDE_DIR})
  21. zephyr_link_libraries(${FUSE_LIBRARIES})
  22. zephyr_library_compile_definitions(_FILE_OFFSET_BITS=64)
  23. zephyr_library_sources(fuse_fs_access.c)
  24. endif()