<div dir="ltr">*shrug* there's no build targets... it's just a update/package/uninstall/install script for android apk targets... <div>Turned out to work pretty good other than...</div><div><br></div><div>configure_file() I had to emit a 1 line script and call 'cmake -P StupidConfigure.cmake' </div>
<div><br></div><div>FILE(GLOB) didn't work because the targets weren't in place...</div><div><br></div><div>Any of the phases will be fine for me..... and adding the custom commands to the custom target works well. I didn't include their own output dependancies; but the result is a script that updates and packages much faster than the old cmake script :)</div>
<div><br></div><div>All of the examples I searched for eluded to the same solution as you... which is why I thought it couldn't be as simple as it is (my issues was that I didn't update the TARGET name correctly in the added commands; changed the custom target and forgot to update the rest)</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 10, 2014 at 11:15 AM, Matthew Woehlke <span dir="ltr"><<a href="mailto:mw_triad@users.sourceforge.net" target="_blank">mw_triad@users.sourceforge.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 2014-03-10 02:55, J Decker wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
add_custom_target( xxx )<br>
add_custom_command( TARGET xxx<br>
(PREBUILD? POSTBUILD? PRELINK?)<br>
COMMAND blah )<br>
</blockquote>
<br></div>
This doesn't make sense; a custom target doesn't have build/link/etc. steps.<br>
<br>
The usual way to do this is:<br>
<br>
add_custom_command(OUTPUT x.y ...)<br>
add_custom_target(xxx DEPENDS x.y ...)<br>
<br>
...which anyway more correctly expresses the individual file dependencies, e.g. foo -> <a href="http://foo.in" target="_blank">foo.in</a>, bar -> <a href="http://bar.in" target="_blank">bar.in</a>, etc.... so if only <a href="http://foo.in" target="_blank">foo.in</a> changes, only the step for foo needs to execute.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
EXECUTE( cmake copy_if_different )<br>
</blockquote>
<br>
Just so you know, this is much better done via configure_file :-). (Of course that won't be available when you switch to using custom commands, but...)<br>
<br>
-- <br>
Matthew<br>
<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/<u></u>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/<u></u>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/<u></u>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/<u></u>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/<u></u>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/<u></u>listinfo/cmake</a><br>
</blockquote></div><br></div>