mirror of
https://github.com/zephyrproject-rtos/zephyr.git
synced 2024-12-04 10:18:24 +08:00
4c60c510c3
This patch removes the need for application build script code to explicitly link 'app' with a filesystem implementation. It does this by introducing a zephyr interface library called 'FS' that contains the usage requirements for linking with the filesystem library subsys__fs and using Kconfig to default to linking the 'app' library with this interface library. Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
20 lines
721 B
CMake
20 lines
721 B
CMake
if(CONFIG_FILE_SYSTEM)
|
|
zephyr_interface_library_named(FS)
|
|
zephyr_link_interface_ifdef(CONFIG_FAT_FILESYSTEM_ELM ELMFAT)
|
|
zephyr_link_interface_ifdef(CONFIG_FILE_SYSTEM_NFFS NFFS)
|
|
|
|
zephyr_library()
|
|
zephyr_library_sources(fs.c)
|
|
zephyr_library_sources_ifdef(CONFIG_FAT_FILESYSTEM_ELM fat_fs.c)
|
|
zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_NFFS nffs_fs.c)
|
|
zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_SHELL shell.c)
|
|
|
|
zephyr_library_link_libraries(FS)
|
|
|
|
target_link_libraries_ifdef(CONFIG_FAT_FILESYSTEM_ELM FS INTERFACE ELMFAT)
|
|
target_link_libraries_ifdef(CONFIG_FILE_SYSTEM_NFFS FS INTERFACE NFFS)
|
|
endif()
|
|
|
|
add_subdirectory_ifdef(CONFIG_FCB ./fcb)
|
|
add_subdirectory_ifdef(CONFIG_NVS ./nvs)
|