mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 06:18:40 +08:00
cmake(bugfix):fix directory not being successfully added when adding romfs
board content should overwrite common content Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
d0dec06e6d
commit
acb5058428
1 changed files with 11 additions and 12 deletions
|
@ -82,8 +82,8 @@ function(nuttx_add_romfs)
|
|||
board_rcraws
|
||||
TARGET board
|
||||
PROPERTY BOARD_RCRAWS)
|
||||
list(APPEND RCSRCS ${board_rcsrcs})
|
||||
list(APPEND RCRAWS ${board_rcraws})
|
||||
list(PREPEND RCSRCS ${board_rcsrcs})
|
||||
list(PREPEND RCRAWS ${board_rcraws})
|
||||
endif()
|
||||
|
||||
foreach(rcsrc ${RCSRCS})
|
||||
|
@ -120,16 +120,15 @@ function(nuttx_add_romfs)
|
|||
endif()
|
||||
|
||||
if(IS_DIRECTORY ${SOURCE_ETC_PREFIX}/${SOURCE_ETC_SUFFIX})
|
||||
file(
|
||||
GLOB subraws
|
||||
LIST_DIRECTORIES false
|
||||
RELATIVE ${SOURCE_ETC_PREFIX}
|
||||
${SOURCE_ETC_PREFIX}/${SOURCE_ETC_SUFFIX})
|
||||
foreach(subraw ${subraws})
|
||||
list(APPEND DEPENDS ${SOURCE_ETC_PREFIX}/${subraw})
|
||||
configure_file(${SOURCE_ETC_PREFIX}/${subraw}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${subraw} COPYONLY)
|
||||
endforeach()
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX}
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory
|
||||
${SOURCE_ETC_PREFIX}/${SOURCE_ETC_SUFFIX}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX})
|
||||
list(APPEND DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX})
|
||||
else()
|
||||
list(APPEND DEPENDS ${SOURCE_ETC_PREFIX}/${SOURCE_ETC_SUFFIX})
|
||||
configure_file(${SOURCE_ETC_PREFIX}/${SOURCE_ETC_SUFFIX}
|
||||
|
|
Loading…
Reference in a new issue