[CMake] INSTALL(EXPORT)

Rupert Brooks rupe.brooks at gmail.com
Wed Aug 13 08:09:30 EDT 2008


Thanks Brad,

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>)

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 :-)

Thanks
Rupert


On Tue, Aug 12, 2008 at 7:15 PM, Brad King <brad.king at kitware.com> wrote:
> Rupert Brooks wrote:
>>
>> 1. Does the name of this file appear in a variable somewhere, so that
>> i can use configure file to write it into the ITKConfig.cmake script.
>> Previously, there was this
>>
>> SET(ITK_LIBRARY_DEPENDS_FILE "@ITK_LIBRARY_DEPENDS_FILE@")
>>
>> where ITK_LIBRARY_DEPENDS_FILE is set by the (deprecated)
>> EXPORT_LIBRARY_DEPENDENCIES command (as far as i can tell)
>>
>> If INSTALL(EXPORT) sets a similar variable, then this change will
>> become very easy.
>
> See documentation of the install(EXPORT) command:
>
> http://www.cmake.org/HTML/cmake-2.6.html#command:install
>
> "By default the generated file will be called <export-name>.cmake but the
> FILE option may be used to specify a different name."
>
> A file of that name is installed to the DESTINATION directory given to the
> command.
>
>> 2. The INSTALL(EXPORT) method seems only to generate the dependency
>> file when installing.  This precludes just leaving the project in the
>> build directory, and pointing a dependent project at that for
>> building.  Is this deliberate, or is it hiding the file somewhere I
>> cant see it.
>
> There is a separate EXPORT() command for that:
>
> http://www.cmake.org/Wiki/CMake_2.6_Notes#Exporting_Targets
> http://www.cmake.org/Wiki/CMake_2.6_Notes#Exporting_from_a_Build_Tree
>
> -Brad
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
--------------------------------------------------------------
Rupert Brooks
McGill Centre for Intelligent Machines (www.cim.mcgill.ca)
Ph.D Student, Electrical and Computer Engineering
http://www.cyberus.ca/~rbrooks


More information about the CMake mailing list