cmake:add mtd driver dhara cmake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
5b3275c07b
commit
ec99359812
@ -165,5 +165,21 @@ if(CONFIG_MTD)
|
||||
list(APPEND SRCS smart.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MTD_DHARA)
|
||||
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/dhara)
|
||||
FetchContent_Declare(
|
||||
dhara
|
||||
URL https://github.com/dlbeer/dhara/archive/refs/heads/master.zip
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/dhara BINARY_DIR
|
||||
${CMAKE_BINARY_DIR}/drivers/mtd/dhara
|
||||
DOWNLOAD_NO_PROGRESS true)
|
||||
FetchContent_Populate(dhara)
|
||||
endif()
|
||||
|
||||
list(APPEND SRCS dhara.c mtd/dhara/dhara/map.c mtd/dhara/dhara/error.c
|
||||
mtd/dhara/dhara/journal.c)
|
||||
target_include_directories(drivers PRIVATE ${CMAKE_CURRENT_LIST_DIR}/dhara)
|
||||
endif()
|
||||
|
||||
target_sources(drivers PRIVATE ${SRCS})
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user