Your first suggestion worked out fantastically.<br><br>Thanks,<br>Hai<br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 1:44 AM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><br>
On 26. Mar, 2010, at 9:23 , Micha Renner wrote:<br>
<br>
> Am Freitag, den 26.03.2010, 08:33 +0100 schrieb Michael Wild:<br>
>> On 25. Mar, 2010, at 23:41 , Hai Nguyen wrote:<br>
>><br>
>>> Hi all,<br>
>>><br>
>>> Is there a way for me to rename the executable during the install? I'm using<br>
>>> the same CMakeList.txt to build several versions and I'd like to install<br>
>>> them to different directories but with the version number stripped off of<br>
>>> the executable.<br>
>>><br>
>>> Thanks,<br>
>>> - Hai<br>
>><br>
>> 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.<br>
>><br>
> Maybe one can use "The PROGRAMS signature" of install<br>
><br>
> install(PROGRAMS files... DESTINATION <dir><br>
> [PERMISSIONS permissions...]<br>
> [CONFIGURATIONS [Debug|Release|...]]<br>
> [COMPONENT <component>]<br>
> [RENAME <name>] [OPTIONAL])<br>
> See:<br>
> <a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:install" target="_blank">www.cmake.org/cmake/help/cmake-2-8-docs.html#command:install</a><br>
><br>
> Micha<br>
<br>
</div>This is possible using the LOCATION target property. But I think the other approach is cleaner and less confusing.<br>
<font color="#888888"><br>
Michael<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>