[CMake] INSTALL(EXPORT)

Brad King brad.king at kitware.com
Wed Aug 13 09:23:07 EDT 2008


Rupert Brooks wrote:
> One last question.  Is there a way to retrieve the list of objects
> that have been put in the EXPORT parameter of various install
> commands?  Basically i would like to use
> 
> EXPORT(TARGETS .... FILE ...)
> 
> to get a file in the build directory equivalent to the file i would get from.
> 
> INSTALL(EXPORT <export name>)

This does not make sense because one target can be installed to multiple
locations.  It is also possible to export a target from the build tree
that is not exported from the install tree (a debugging-only library or
something like that).  The entries in the install export-name are
associated with the installed files, not the targets.

There can be several calls to EXPORT(TARGETS) that write to the same
file using the APPEND option.  They can be spread throughout the source
tree near where each target is created and installed.

> For backward compatibility, if nothing else, it would be nice to be
> able to build another project against the build tree without
> installing.  The documentation does not mention such a thing, but i
> can be hopeful :-)

FYI, I am planning to construct build-tree and install-tree export rules
for upstream VTK and ITK once we require CMake 2.6.

-Brad


More information about the CMake mailing list