<br><font size=2 face="sans-serif">Thanks, this works nicely</font>
<br>
<br><font size=2 face="sans-serif">Sorry for the double posting.</font>
<br>
<br><font size=2 face="sans-serif"> I waited for 30 minutes and the
mail didn't appear on the list, so I assumed it failed somehow.</font>
<br>
<br><font size=2 face="sans-serif">-mika</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Michael Wild <themiwi@gmail.com></b>
</font>
<br><font size=1 face="sans-serif">Sent by: cmake-bounces@cmake.org</font>
<p><font size=1 face="sans-serif">28.12.2010 16:23</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">cmake@cmake.org</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Re: [CMake] add_executable
created file name</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>On 12/28/2010 02:39 PM, Mika.Rajala@patria.fi wrote:<br>
> Hello<br>
> <br>
> I'd need to get the filepath of a created executable file, so that
i can <br>
> use the filepath on a custom command.<br>
> <br>
> add_executable(Program ...)<br>
> <br>
> add_custom_command(TARGET Program POST_BUILD COMMAND ${ProgramToRun}
<br>
> ${Program} ...)<br>
> <br>
> To clarify, i'd like to run the executable "ProgramToRun"
with a command <br>
> line argument that is a path to the executable created by add_executable.<br>
> <br>
> the problem i'm facing is that with visual studio, the path is something
<br>
> like<br>
> <br>
> <some_path>/build/Program/debug/Program.exe<br>
> <br>
> or with release<br>
> <br>
> <some_path>/build/Program/release/Program.exe<br>
> <br>
> I have tried messing around with some variables such as:<br>
> - RUNTIME_OUTPUT_DIRECTORY<br>
> - BUILD_TYPE<br>
> Possibly others i can't remember, and undo wont show on my editor
for some <br>
> odd reason.<br>
> <br>
> I think there has to be a way, since how would <br>
> <br>
> INSTALL(TARGETS Program)<br>
> <br>
> know what files to copy.<br>
> <br>
> i'd like to get my hands on that very information.<br>
> <br>
> -mika<br>
<br>
This has been addressed in<br>
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0cdb600, but that<br>
hasn't made it into any official release yet. Until then, you can use<br>
the CMAKE_CFG_INTDIR variable (refer to the docs for the details).<br>
<br>
Michael<br>
_______________________________________________<br>
Powered by www.kitware.com<br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.cmake.org/mailman/listinfo/cmake<br>
</tt></font>
<br>