This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1b7ddab3173caf78b5726ac667f67334a9e5ce6a Author: xuxin19 <xuxi...@xiaomi.com> AuthorDate: Thu Feb 22 17:05:52 2024 +0800 cmake:adapt the header file symbolic link to the common directory fix `board.h` is not set correctly when using cmake to compile a board with common directory Signed-off-by: xuxin19 <xuxi...@xiaomi.com> --- cmake/nuttx_generate_headers.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/nuttx_generate_headers.cmake b/cmake/nuttx_generate_headers.cmake index b4a2049e47..af12b4352a 100644 --- a/cmake/nuttx_generate_headers.cmake +++ b/cmake/nuttx_generate_headers.cmake @@ -49,8 +49,13 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/include/arch) endif() if(NOT EXISTS ${CMAKE_BINARY_DIR}/include_arch/arch/board) - nuttx_create_symlink(${NUTTX_BOARD_DIR}/include - ${CMAKE_BINARY_DIR}/include_arch/arch/board) + if(EXISTS ${NUTTX_BOARD_DIR}/include) + nuttx_create_symlink(${NUTTX_BOARD_DIR}/include + ${CMAKE_BINARY_DIR}/include_arch/arch/board) + elseif(EXISTS ${NUTTX_BOARD_DIR}/../common/include) + nuttx_create_symlink(${NUTTX_BOARD_DIR}/../common/include + ${CMAKE_BINARY_DIR}/include_arch/arch/board) + endif() endif() if(NOT EXISTS ${CMAKE_BINARY_DIR}/include_arch/arch/chip)