<div dir="auto"><div>Did you check whether if<div dir="auto"><a href="https://cmake.org/cmake/help/latest/command/include_external_msproject.html">https://cmake.org/cmake/help/latest/command/include_external_msproject.html</a><br></div><div dir="auto"><br></div><div dir="auto">wouldn't be better in your case?</div><br><br><div class="gmail_quote"><div dir="ltr">Le mar. 4 déc. 2018 01:43, James Bigler <<a href="mailto:jamesbigler@gmail.com">jamesbigler@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">I have an external project that I would like to compile using their build system, and be able to set the VS_COMMAND to the result of the project so I can run it.<div><br></div><div><div><font face="monospace, monospace">      add_custom_target(${cmake_target}</font></div><div><font face="monospace, monospace">        COMMAND make mytarget ${BUILD_ARGS}</font></div><div><font face="monospace, monospace">        COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${PATH_TO_EXTERNAL}/mytarget.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG></font></div><div><font face="monospace, monospace">        WORKING_DIRECTORY ${PATH_TO_EXTERNAL}</font></div><div><font face="monospace, monospace">        )<br></font></div></div><div><font face="monospace, monospace">      set_property( TARGET ${cmake_target} PROPERTY VS_DEBUGGER_COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG>/mytarget.exe" )<br></font></div><div><br></div><div>The VS_DEBUGGER_COMMAND works for targets such as add_executable, but not for add_custom_target.</div><div><br></div><div>Is there a way to get what I want?</div><div><br></div><div>Note that this is part of a larger CMake project that builds most of the other stuff using CMake, but I have a few external projects that I would like as part of the main solution.</div><div><br></div><div>Thanks,</div><div>James</div></div></div></div>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer noreferrer" 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" rel="noreferrer noreferrer" 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" rel="noreferrer noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer noreferrer" 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" rel="noreferrer noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div></div></div>