Skip to content

Commit 37bab55

Browse files
xuxin930xiaoxiang781216
authored andcommitted
cmake(bugfix):reduce static library propagation behavior
This will cause duplicate definitions during the link process Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
1 parent 2a76d17 commit 37bab55

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

boot/mcuboot/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,15 @@ if(CONFIG_BOOT_MCUBOOT)
102102
PRIVATE mcuboot/ext/tinycrypt/lib/include)
103103
endif()
104104

105-
target_include_directories(mcuboot PUBLIC mcuboot/boot/nuttx/include)
106-
target_include_directories(mcuboot PUBLIC mcuboot/boot/bootutil/include)
105+
set(INCDIR ${CMAKE_CURRENT_LIST_DIR}/mcuboot/boot/nuttx/include
106+
${CMAKE_CURRENT_LIST_DIR}/mcuboot/boot/bootutil/include)
107+
target_include_directories(mcuboot PRIVATE ${INCDIR})
107108

108109
target_compile_options(mcuboot PRIVATE -Wno-undef)
109110
target_sources(mcuboot PRIVATE ${SRCS})
111+
112+
set_property(
113+
TARGET nuttx
114+
APPEND
115+
PROPERTY NUTTX_INCLUDE_DIRECTORIES ${INCDIR})
110116
endif()

0 commit comments

Comments
 (0)