Skip to content

Commit

Permalink
cmake(bugfix):reduce static library propagation behavior
Browse files Browse the repository at this point in the history
This will cause duplicate definitions during the link  process

Signed-off-by: xuxin19 <[email protected]>
  • Loading branch information
xuxin930 authored and xiaoxiang781216 committed Nov 13, 2024
1 parent 2a76d17 commit 37bab55
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions boot/mcuboot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ if(CONFIG_BOOT_MCUBOOT)
PRIVATE mcuboot/ext/tinycrypt/lib/include)
endif()

target_include_directories(mcuboot PUBLIC mcuboot/boot/nuttx/include)
target_include_directories(mcuboot PUBLIC mcuboot/boot/bootutil/include)
set(INCDIR ${CMAKE_CURRENT_LIST_DIR}/mcuboot/boot/nuttx/include
${CMAKE_CURRENT_LIST_DIR}/mcuboot/boot/bootutil/include)
target_include_directories(mcuboot PRIVATE ${INCDIR})

target_compile_options(mcuboot PRIVATE -Wno-undef)
target_sources(mcuboot PRIVATE ${SRCS})

set_property(
TARGET nuttx
APPEND
PROPERTY NUTTX_INCLUDE_DIRECTORIES ${INCDIR})
endif()

0 comments on commit 37bab55

Please sign in to comment.