<div dir="ltr">Add custom command doesn't generate a target. You need to use add_custom_target to create an actual target.<div><br></div><div>I believe what you are missing is a custom target that consume the output of the add custom command, than the install should work. A fully contained example that I could run would make solving this issue easier.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 12:48 PM, J Decker <span dir="ltr"><<a href="mailto:d3ck0r@gmail.com" target="_blank">d3ck0r@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Am I incorrect in assuming that this should work?<div><br><div>I added dependancies to them and that helped... until I leared I had the dependants wrong order, and it wouldn't let me depend the common on both of these... so when I reversed them, then neither built before install....</div></div><div><br></div><div>I recall a similar message not long ago about asking to depend targets on INSTALL... but I can't use install because it's a phony target.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 6, 2015 at 5:26 PM, J Decker <span dir="ltr"><<a href="mailto:d3ck0r@gmail.com" target="_blank">d3ck0r@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a script that builds some package sort of files based on other sources... <div><br></div><div>Basically a simplified version...</div><div>I would think since the output file of add_custom_command was referenced in a INSTALL that those targets should get build before INSTALL... but using MinGW Makefiles, 'make install' fails to generate either file....</div><div><br></div><div>------ CMakeLists.txt -------------</div><div><div>cmake_minimum_required(VERSION 3.0)</div><div><br></div><div>project( test )</div><div><br></div><div>add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/<a href="http://resources.kw" target="_blank">resources.kw</a></div><div><span style="white-space:pre-wrap">             </span>COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/<a href="http://resources.kw" target="_blank">resources.kw</a></div><div>                   )</div><div>INSTALL( FILES ${CMAKE_BINARY_DIR}/<a href="http://resources.kw" target="_blank">resources.kw</a> DESTINATION bin )</div><div><br></div><div><br></div><div>add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/application.dat</div><div><span style="white-space:pre-wrap">                               </span>   COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/application.dat</div><div>                   )</div><div>INSTALL( FILES ${CMAKE_BINARY_DIR}/application.dat DESTINATION bin )</div><div>------------ end CMakeLists.txt --------------</div><div><br></div><div><br></div><div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>
</blockquote></div><br></div>
</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://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div>