|
@@ -295,7 +295,15 @@ macro(__component_set_dependencies reqs type)
|
|
|
foreach(req ${reqs})
|
|
foreach(req ${reqs})
|
|
|
if(req IN_LIST build_component_targets)
|
|
if(req IN_LIST build_component_targets)
|
|
|
__component_get_property(req_lib ${req} COMPONENT_LIB)
|
|
__component_get_property(req_lib ${req} COMPONENT_LIB)
|
|
|
- target_link_libraries(${component_lib} ${type} ${req_lib})
|
|
|
|
|
|
|
+ if("${type}" STREQUAL "PRIVATE")
|
|
|
|
|
+ set_property(TARGET ${component_lib} APPEND PROPERTY LINK_LIBRARIES ${req_lib})
|
|
|
|
|
+ set_property(TARGET ${component_lib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:${req_lib}>)
|
|
|
|
|
+ elseif("${type}" STREQUAL "PUBLIC")
|
|
|
|
|
+ set_property(TARGET ${component_lib} APPEND PROPERTY LINK_LIBRARIES ${req_lib})
|
|
|
|
|
+ set_property(TARGET ${component_lib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${req_lib})
|
|
|
|
|
+ else() # INTERFACE
|
|
|
|
|
+ set_property(TARGET ${component_lib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${req_lib})
|
|
|
|
|
+ endif()
|
|
|
endif()
|
|
endif()
|
|
|
endforeach()
|
|
endforeach()
|
|
|
endmacro()
|
|
endmacro()
|
|
@@ -312,12 +320,7 @@ macro(__component_set_all_dependencies)
|
|
|
__component_set_dependencies("${priv_reqs}" PRIVATE)
|
|
__component_set_dependencies("${priv_reqs}" PRIVATE)
|
|
|
else()
|
|
else()
|
|
|
__component_get_property(reqs ${component_target} __REQUIRES)
|
|
__component_get_property(reqs ${component_target} __REQUIRES)
|
|
|
- foreach(req ${reqs})
|
|
|
|
|
- if(req IN_LIST build_component_targets)
|
|
|
|
|
- __component_get_property(req_lib ${req} COMPONENT_LIB)
|
|
|
|
|
- target_link_libraries(${component_lib} INTERFACE ${req_lib})
|
|
|
|
|
- endif()
|
|
|
|
|
- endforeach()
|
|
|
|
|
|
|
+ __component_set_dependencies("${reqs}" INTERFACE)
|
|
|
endif()
|
|
endif()
|
|
|
endmacro()
|
|
endmacro()
|
|
|
|
|
|