[CMake] How to get list of target dependencies?

Robert Dailey rcdailey.lists at gmail.com
Thu May 4 11:47:14 EDT 2017


How can I get a list of target dependencies of a target? For example,
if I have 3 library targets that depend on each other like this:

A -> B -> C

When I ask for the target dependencies for A, I should get a list back
with B in it. Basically this would be the same list I pass to
target_link_libraries(), minus actual library files with no
corresponding target known to CMake.

I see a LINK_DEPENDS target property. Is this what I want?


More information about the CMake mailing list