Skip to content

Commit 3ae822c

Browse files
xuxin930xiaoxiang781216
authored andcommitted
cmake:remove no need target_link_library in static target
the link_library of the static target will cause PRIVATE to be inherited to nuttx, resulting in duplicate linking and definition problems. because all target static libraries will eventually be linked, there is no need to specify it explicitly. Signed-off-by: xuxin19 <[email protected]>
1 parent ec243f0 commit 3ae822c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

cmake/nuttx_add_application.cmake

-7
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,6 @@ function(nuttx_add_application)
228228
# interface include and libraries
229229
foreach(dep ${DEPENDS})
230230
nuttx_add_dependencies(TARGET ${TARGET} DEPENDS ${dep})
231-
if(TARGET ${dep})
232-
get_target_property(dep_type ${dep} TYPE)
233-
if(${dep_type} STREQUAL "STATIC_LIBRARY")
234-
target_link_libraries(${TARGET} PRIVATE ${dep})
235-
endif()
236-
endif()
237-
238231
endforeach()
239232
endif()
240233
endfunction()

0 commit comments

Comments
 (0)