cmake-bugfix:add santity check for target depends and change
inter_library header inheritance level Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
6960f1b967
commit
4b11d37cf7
@ -207,10 +207,13 @@ function(nuttx_add_application)
|
|||||||
# interface include and libraries
|
# interface include and libraries
|
||||||
foreach(dep ${DEPENDS})
|
foreach(dep ${DEPENDS})
|
||||||
nuttx_add_dependencies(TARGET ${TARGET} DEPENDS ${dep})
|
nuttx_add_dependencies(TARGET ${TARGET} DEPENDS ${dep})
|
||||||
|
if(TARGET ${dep})
|
||||||
get_target_property(dep_type ${dep} TYPE)
|
get_target_property(dep_type ${dep} TYPE)
|
||||||
if(${dep_type} STREQUAL "STATIC_LIBRARY")
|
if(${dep_type} STREQUAL "STATIC_LIBRARY")
|
||||||
target_link_libraries(${TARGET} PRIVATE ${dep})
|
target_link_libraries(${TARGET} PRIVATE ${dep})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
@ -36,7 +36,7 @@ function(nuttx_add_library_internal target)
|
|||||||
# add main include directories
|
# add main include directories
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
${target} SYSTEM
|
${target} SYSTEM
|
||||||
PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include
|
PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include
|
||||||
${CMAKE_BINARY_DIR}/include_arch)
|
${CMAKE_BINARY_DIR}/include_arch)
|
||||||
|
|
||||||
# Set global compile options & definitions We use the "nuttx" target to hold
|
# Set global compile options & definitions We use the "nuttx" target to hold
|
||||||
|
Loading…
Reference in New Issue
Block a user