On Wednesday, March 19, 2014 10:11 AM, Brian Lewis wrote:
If X brings in Y as an external project, and Y brings in Z as an
external project, is there some way for Y to communicate information
about Z back to X, e.g., some include directory?
My situation is, X doesn't know anything about Z, but needs to be able
to find one of Z's headers. I wish I could add Y as an external project
and then include_directories(${Y_INCLUDE_DIRS}).
I haven't yet had a chance to play with this, but isn't it something like:
ExternalProject_Add(Z
...
)
set_property(TARGET Z
INTERFACE_INCLUDE_DIRECTORIES
"${relativeLocation}/include/Z"
)
ExternalProject_Add(Y
...
DEPENDS Z
...
)
set_property(TARGET Y
INTERFACE_INCLUDE_DIRECTORIES
"${relativeLocation}/include/Y"
)
target(X
...
)
add_dependencies(X Y)
I have bookmarked this link for when I get round to doing this:
http://www.kdab.com/modern-cmake-with-qt-and-boost/
Ben
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake