<div dir="ltr">Or you can use ${CMAKE_EXECUTABLE_SUFFIX}<div><br></div><div>--</div><div>Tarjei</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 18 May 2014 19:40, Leif Walsh <span dir="ltr"><<a href="mailto:leif.walsh@gmail.com" target="_blank">leif.walsh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span>You can also use a generator I think: $<TARGET_FILE:rexximage></span><span class="HOEnZb"><font color="#888888"><div>-- <br>Cheers,<br>Leif</div></font></span><div class="HOEnZb"><div class="h5">
<br><br><div class="gmail_quote"><p>On Sun, May 18, 2014 at 1:39 PM, Nils Gladitz <span dir="ltr"><<a href="mailto:nilsgladitz@gmail.com" target="_blank">nilsgladitz@gmail.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 18.05.2014 19:24, Rick McGuire
wrote:<br></div>
<blockquote type="cite">
<div dir="ltr">We have a project that builds some executables,
then uses those executables to build some additional build
artifacts. We have this working well using makefiles on Windows
and various unix variants. I decided it would be nice to try
doing a build using a Visual Studio project. The various
compile/link steps worked great, but any step that needed to use
one of the built executables was failing to find the
executables. An examination of the build tree revealed that
Visual Studio was placing the executables in bin\Debug rather
than the expected bin directory.
<div>
<br></div>
<div>The command we're using is specified as: </div>
<div><br></div>
<div>
<div>
<pre>add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rexx.img
COMMAND ./rexximage
DEPENDS rexximage rxapi rexxutil ${image_class_files} ${platform_rexx_img_depends}
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
</pre>
<pre></pre>
<pre>where we're assuming the rexximage.exe file will be in the CMAKE_RUNTIME_OUTPUT_DIRECTORY, which is specified as ${CMAKE_CURRENT_BINARY_DIR}/bin. Is there a more appropriate method we should be doing to locate this executable that will work using both the NMake build process and a Visual Studio project?</pre>
</div>
</div>
</div>
</blockquote>
<br>
Try "COMMAND rexximage".<br>
If "rexximage" is an executable target (as created by
add_executable()) add_custom_command() will substitute the actual
command.<br><br>
Nils<br></blockquote></div><br></div></div><br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</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>
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></blockquote></div><br></div>