Philipp Möller wrote:
> It would be great, if I could export imported targets and if CMake could
> walk the dependency tree automatically and import those targets on an
> as-needed basis.

Part of the problem is that the place where you import your dependent 
targets from (and the locations calculated) are not necessarily the same for 
your downstreams.

You export your targets to and -exports file, and presumably you import that 
in a -config file. In the same config file, you should add code to find your 
dependencies too.

 
http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html#creating-packages

The find_dependency macro can help with forwarding some find_package 
arguments.

 http://www.cmake.org/cmake/help/v3.0/module/CMakeFindDependencyMacro.html

Thanks,

Steve.


-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to