<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 18.05.2014 19:24, Rick McGuire
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPJz3GvPo1TJxiBFwSr5+kBo2tB4_PDfDED+1uzTANEhZPdGpw@mail.gmail.com"
      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 style="font-family:'Bitstream Vera Sans
            Mono';font-size:11pt;color:rgb(0,0,0)">
            <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>
  </body>
</html>