[CMake] Transitively including dependency source directories
Robert Dailey
rcdailey at gmail.com
Fri Oct 14 17:39:53 EDT 2011
If I have the following target dependency chain:
A >> B >> C >> D
Then target "D" must have the include directories (defined on a per project
basis with a cache variable currently) for C, B, and A.
Right now I'm trying to implement the logic for this myself using macro
recursion, but as of right now I don't know of any way to get the list of
target dependencies from a target. For example, if I query target C's
dependencies, I should get a list back with just "B" in it. Then when I
query for B's dependencies, I should get a list with A in it.
I thought there might be a way to use get_target_property() for this, but
doesn't seem so.
How would you all recommend I go about this? Am I completely off base?
Right now each target has a "${name}_INCLUDE_DIRS" internal cache variable,
which is a list of that target's include directories, so that if other
targets specify it as a dependency, they also know how to get to that
target's header files.
---------
Robert Dailey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111014/4116902c/attachment.htm>
More information about the CMake
mailing list