1if(CONFIG_FILE_SYSTEM_LITTLEFS)
2  add_library(LITTLEFS INTERFACE)
3
4  target_include_directories(LITTLEFS INTERFACE
5    ${ZEPHYR_LITTLEFS_MODULE_DIR}
6    ${CMAKE_CURRENT_SOURCE_DIR}
7  )
8  target_link_libraries(LITTLEFS INTERFACE zephyr_interface)
9  target_compile_definitions(LITTLEFS INTERFACE LFS_CONFIG=zephyr_lfs_config.h)
10
11  zephyr_library()
12  zephyr_library_sources(
13    ${ZEPHYR_LITTLEFS_MODULE_DIR}/lfs.c
14    ${ZEPHYR_LITTLEFS_MODULE_DIR}/lfs_util.c
15    zephyr_lfs_crc.c
16  )
17  zephyr_library_link_libraries(LITTLEFS)
18endif()
19