[CMake] Inheriting include directories from dependencies

Robert Dailey rcdailey at gmail.com
Thu Jan 15 22:45:21 EST 2009


Hi,

Currently I'm specifying include directories on a per-project basis. Suppose
I have projects A, B, and C. Project C would depend on A and B by specifying
A and B in a call to target_link_libraries(). Both projects A and B have
include directories that I set via a call to include_directories() and the
directories are not the same. The include directories I use are those given
to me by various Find modules (find_package()).

The thing is that include files in A and B (Which I reference in the source
code for project C) include header files in external dependencies of A and
B. This means that project C will not compile unless it has the include
directories available for the dependencies of both A and B. Is there a built
in feature that facilitates inheriting include directories from A and B and
placing them into C implicitly? If not, is there some work-around for this?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090115/542d38b7/attachment.htm>


More information about the CMake mailing list