On 11/22/2011 10:03 AM, Stephen Kelly wrote:
Brad King wrote:
We will have to require that the install(EXPORT)
commands be invoked in dependency order (ex. A before B).  That way when
the command installing ExportB is writing library B's dependency on A, it
can transform the name using the options that had been given to the
install command for ExportA, such as its NAMESPACE.

This is required because ExportB will create an imported target for library B
and that imported target will list its dependency on an imported target for
library A.  What is that imported target called?  Where is it defined?  Only
ExportA knows, and then only after its install(EXPORT) has been called.

Furthermore, the targets file
generated for ExportB will need to include() the file generated for
ExportA using the DESTINATION given to the latter to make its targets
available.

And its FILE presumably, but why? This ties in to the question of whether
find_package(B) should find the dependencies of B:

We could leave this part out and leave it up to the Config.cmake file
author to ensure ExportA's targets file is loaded when ExportB's targets
file is loaded.

-Brad
--

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