Skip to content

Commit

Permalink
cmake:remove no need target_link_library in static target
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
xuxin930 committed Nov 13, 2024
1 parent addfe12 commit 9784ca9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cmake/nuttx_add_application.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,6 @@ function(nuttx_add_application)
# interface include and libraries
foreach(dep ${DEPENDS})
nuttx_add_dependencies(TARGET ${TARGET} DEPENDS ${dep})
if(TARGET ${dep})
get_target_property(dep_type ${dep} TYPE)
if(${dep_type} STREQUAL "STATIC_LIBRARY")
target_link_libraries(${TARGET} PRIVATE ${dep})
endif()
endif()

endforeach()
endif()
endfunction()

0 comments on commit 9784ca9

Please sign in to comment.