cmake:change add_dep to nuttx_add_dep for nuttx_add_application

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2024-03-28 11:24:30 +08:00 committed by Alan Carvalho de Assis
parent 8ab4d3c950
commit 6960f1b967

View file

@ -206,11 +206,10 @@ function(nuttx_add_application)
# using target_link_libraries for dependencies provides linking as well as
# interface include and libraries
foreach(dep ${DEPENDS})
nuttx_add_dependencies(TARGET ${TARGET} DEPENDS ${dep})
get_target_property(dep_type ${dep} TYPE)
if(${dep_type} STREQUAL "STATIC_LIBRARY")
target_link_libraries(${TARGET} PRIVATE ${dep})
else()
add_dependencies(${TARGET} ${dep})
endif()
endforeach()
endif()