cmake:complete missing changes during cmake reforming for fs
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
b756a7c3a9
commit
b1cc5b50b1
@ -18,18 +18,6 @@
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS)
|
||||
|
||||
if(CONFIG_FS_HOSTFS)
|
||||
list(APPEND SRCS hostfs.c)
|
||||
target_sources(fs PRIVATE hostfs.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_FS_HOSTFS_RPMSG)
|
||||
list(APPEND SRCS hostfs_rpmsg.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_FS_HOSTFS_RPMSG_SERVER)
|
||||
list(APPEND SRCS hostfs_rpmsg_server.c)
|
||||
endif()
|
||||
|
||||
target_sources(fs PRIVATE ${SRCS})
|
||||
|
@ -26,18 +26,28 @@ if(CONFIG_FS_LITTLEFS)
|
||||
littlefs
|
||||
URL https://github.com/ARMmbed/littlefs/archive/v${LITTLEFS_VERSION}.tar.gz
|
||||
SOURCE_DIR
|
||||
${CMAKE_CURRENT_LIST_DIR}/littlefs)
|
||||
${CMAKE_CURRENT_LIST_DIR}/littlefs
|
||||
BINARY_DIR
|
||||
${CMAKE_BINARY_DIR}/fs/littlefs/littlefs
|
||||
PATCH_COMMAND patch -p2 -d ${CMAKE_CURRENT_LIST_DIR} <
|
||||
${CMAKE_CURRENT_LIST_DIR}/lfs_util.patch)
|
||||
FetchContent_MakeAvailable(littlefs)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(
|
||||
fs
|
||||
PRIVATE -DLFS_TRACE=finfo -DLFS_DEBUG=finfo -DLFS_WARN=fwarn
|
||||
-DLFS_ERROR=ferr -DLFS_ASSERT=DEBUGASSERT
|
||||
-DLFS_CONFIG=${CMAKE_CURRENT_LIST_DIR}/lfs_vfs.h)
|
||||
PRIVATE -DLFS_TRACE=finfo
|
||||
-DLFS_DEBUG=finfo
|
||||
-DLFS_WARN=fwarn
|
||||
-DLFS_ERROR=ferr
|
||||
-DLFS_ASSERT=DEBUGASSERT
|
||||
-DLFS_CONFIG=${CMAKE_CURRENT_LIST_DIR}/lfs_vfs.h
|
||||
-DLFS_NAME_MAX=${CONFIG_FS_LITTLEFS_NAME_MAX}
|
||||
-DLFS_FILE_MAX=${CONFIG_FS_LITTLEFS_FILE_MAX}
|
||||
-DLFS_ATTR_MAX=${CONFIG_FS_LITTLEFS_ATTR_MAX})
|
||||
|
||||
target_sources(fs PRIVATE lfs_vfs.c ${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs_util.c)
|
||||
|
||||
target_include_directories(fs PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_include_directories(fs PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif()
|
||||
|
@ -21,13 +21,24 @@
|
||||
# Don't build anything if mountpoint doesn't support
|
||||
|
||||
if(NOT CONFIG_DISABLE_MOUNTPOINT)
|
||||
set(SRCS)
|
||||
|
||||
list(APPEND SRCS fs_partition.c)
|
||||
set(SRCS fs_partition.c)
|
||||
|
||||
if(CONFIG_PTABLE_PARTITION)
|
||||
list(APPEND SRCS fs_ptable.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MBR_PARTITION)
|
||||
list(APPEND SRCS fs_mbr.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_GPT_PARTITION)
|
||||
list(APPEND SRCS fs_gpt.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_GPT_PARTITION)
|
||||
list(APPEND SRCS fs_txtable.c)
|
||||
endif()
|
||||
|
||||
target_sources(fs PRIVATE ${SRCS})
|
||||
endif()
|
||||
|
@ -25,6 +25,7 @@ if(CONFIG_FS_PROCFS)
|
||||
fs_procfscpuinfo.c
|
||||
fs_procfscpuload.c
|
||||
fs_procfscritmon.c
|
||||
fs_procfsfdt.c
|
||||
fs_procfsiobinfo.c
|
||||
fs_procfsmeminfo.c
|
||||
fs_procfsproc.c
|
||||
|
@ -18,14 +18,10 @@
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS)
|
||||
|
||||
if(CONFIG_FS_RPMSGFS)
|
||||
list(APPEND SRCS rpmsgfs.c rpmsgfs_client.c)
|
||||
target_sources(fs PRIVATE rpmsgfs.c rpmsgfs_client.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_FS_RPMSGFS_SERVER)
|
||||
list(APPEND SRCS rpmsgfs_server.c)
|
||||
target_sources(fs PRIVATE rpmsgfs_server.c)
|
||||
endif()
|
||||
|
||||
target_sources(fs PRIVATE ${SRCS})
|
||||
|
@ -21,5 +21,5 @@
|
||||
# Include POSIX message queue support
|
||||
|
||||
if(CONFIG_FS_SHM)
|
||||
target_sources(fs PRIVATE shm_open.c shm_close.c)
|
||||
target_sources(fs PRIVATE shm_open.c shm_unlink.c shmfs.c shmfs_alloc.c)
|
||||
endif()
|
||||
|
@ -54,6 +54,12 @@ if(NOT "${CONFIG_PSEUDOFS_SOFTLINKS}" STREQUAL "0")
|
||||
list(APPEND SRCS fs_link.c fs_symlink.c fs_readlink.c)
|
||||
endif()
|
||||
|
||||
# Pseudofile support
|
||||
|
||||
if(CONFIG_PSEUDOFS_FILE)
|
||||
list(APPEND SRCS fs_pseudofile.c)
|
||||
endif()
|
||||
|
||||
# Stream support
|
||||
|
||||
if(CONFIG_FILE_STREAM)
|
||||
|
Loading…
Reference in New Issue
Block a user