Skip to content

Commit

Permalink
cmake(bugfix):fix common/etc confilt with src/etc in CMake genromfs
Browse files Browse the repository at this point in the history
We use the rules added later to overwrite the previous rules
  • Loading branch information
xuxin930 committed Dec 25, 2024
1 parent c568baf commit 907d150
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/nuttx_add_romfs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,18 @@ function(process_all_directory_romfs)
DEPENDS ${dyn_deps})
list(APPEND DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX})
else()
list(FIND DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX} index)
if(index GREATER -1)
set(APPEND_OPTION APPEND)
else()
set(APPEND_OPTION)
endif()
list(APPEND DEPENDS ${SOURCE_ETC_PREFIX}/${SOURCE_ETC_SUFFIX})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX}
COMMAND
${CMAKE_COMMAND} -E copy ${SOURCE_ETC_PREFIX}/${SOURCE_ETC_SUFFIX}
${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX}
${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX} ${APPEND_OPTION}
DEPENDS ${dyn_deps})
list(APPEND DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_ETC_SUFFIX})
endif()
Expand Down

0 comments on commit 907d150

Please sign in to comment.