[CMake] rename of target on install

Michael Wild themiwi at gmail.com
Fri Mar 26 03:33:26 EDT 2010


On 25. Mar, 2010, at 23:41 , Hai Nguyen wrote:

> Hi all,
> 
> Is there a way for me to rename the executable during the install? I'm using
> the same CMakeList.txt to build several versions and I'd like to install
> them to different directories but with the version number stripped off of
> the executable.
> 
> Thanks,
> - Hai

I don't think there is a way of doing that. But what you can do is setting the OUTPUT_NAME and RUNTIME_OUTPUT_DIRECTORY target properties using the SET_TARGET_PROPERTIES command. This way, you can already reproduce the executable names and directory structure in the build tree.

HTH

Michael



More information about the CMake mailing list