[CMake] rename of target on install
Micha Renner
Micha.Renner at t-online.de
Fri Mar 26 04:23:06 EDT 2010
Am Freitag, den 26.03.2010, 08:33 +0100 schrieb Michael Wild:
> 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.
>
Maybe one can use "The PROGRAMS signature" of install
install(PROGRAMS files... DESTINATION <dir>
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[COMPONENT <component>]
[RENAME <name>] [OPTIONAL])
See:
www.cmake.org/cmake/help/cmake-2-8-docs.html#command:install
Micha
More information about the CMake
mailing list