<div dir="ltr"><div>Is there a less annoying way of doing this?<br><br>function(get_dependent_targets TARGET RETURN)<br>  get_property(LOC TARGET ${TARGET} PROPERTY LOCATION)<br>  set(RTN ${LOC})<br>  get_property(LIBS TARGET ${TARGET} PROPERTY LINK_LIBRARIES)<br>
  foreach(LIB ${LIBS})<br>    get_dependent_targets(${LIB} LIB_LIST)<br>    foreach(LIBI ${LIB_LIST})<br>      list(APPEND RTN ${LIBI})<br>    endforeach()<br>  endforeach()<br>  set(${RETURN} ${RTN} PARENT_SCOPE)<br>endfunction()<br>
<br></div><div>Specifically I'm trying to generate a list of static link targets for a library to output ot a file using the template system so that a rust build can statically link correctly to all the dependent static targets for a given library...<br>
</div><div><br>~<br></div>Doug.<br></div>