mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/do_not_require_new_target_link_library_signature' into 'master'
CMake: Do not force use of new target_link_libraries signature See merge request espressif/esp-idf!5471
This commit is contained in:
commit
56afdedf7c
@ -295,7 +295,15 @@ macro(__component_set_dependencies reqs type)
|
||||
foreach(req ${reqs})
|
||||
if(req IN_LIST build_component_targets)
|
||||
__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()
|
||||
endforeach()
|
||||
endmacro()
|
||||
@ -312,12 +320,7 @@ macro(__component_set_all_dependencies)
|
||||
__component_set_dependencies("${priv_reqs}" PRIVATE)
|
||||
else()
|
||||
__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()
|
||||
endmacro()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user