[cmake-developers] Generator expressions for output directory/name (and install?)

Robert Goulet Robert.Goulet at autodesk.com
Wed Jun 10 13:43:48 EDT 2015


Ok I think I got something nicely integrated now.
 
Patch in attachment.

This enable generator expressions for the target properties OUTPUT_NAME and RUNTIME_OUTPUT_DIRECTORY, as well as the DESTINATION property of the install command.

Cheers!

-Robert Goulet

-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Wednesday, June 10, 2015 8:47 AM
To: Robert Goulet
Cc: cmake-developers at cmake.org
Subject: Re: [cmake-developers] Generator expressions for output directory/name (and install?)

On 06/09/2015 05:00 PM, Robert Goulet wrote:
> install scripts doesn't seem to be per configuration

While there is not a separate script for each configuration the scripts themselves do support switching on the configuration selected for installation.  For single-configuration generators they only need to have the one configuration specified by the CMAKE_BUILD_TYPE.  For multi-configuration generators they do get per-config code selected by conditional blocks.  Try using one of the Visual Studio or Xcode generators to see how the install scripts look.  Also try using a genex in the list of files given to the install(FILES) command.

See cmScriptGenerator.cxx for the logic that dispatches based on whether the script content is to be single or multi config.

-Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: more-generator-expressions.patch
Type: application/octet-stream
Size: 29212 bytes
Desc: more-generator-expressions.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150610/c8e4a9f0/attachment-0001.obj>


More information about the cmake-developers mailing list