I should add:<div><br></div><div>CMake 2.8.7</div><div>Windows 7 64-bit</div><div>Visual Studio 2010 Win64 Generator</div><div><br></div><div>As per suggestion, I&#39;m working on an isolated test case at the moment as the system it&#39;s part of is pretty complex so maybe there&#39;s something further down the line that&#39;s tripping it up. I&#39;ll post about the results once I&#39;ve worked it out.</div>
<div><br></div><div>Mike</div><div><br><div class="gmail_quote">On 6 April 2012 10:00, Mike <span dir="ltr">&lt;<a href="mailto:too.cheesy@gmail.com">too.cheesy@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br><br>I have a custom build command which executes an internal resource compiler and I am having trouble getting it to rebuild whenever one of the files being packaged is changed. In time I will alter it to scan the input file for dependencies and build a list automatically, but for now I am manually specifying the files which are duplicated in the resource file. It&#39;s similar to Qt .qrc system and I based much of this on the Qt macros, yet it doesn&#39;t work for me.<br>

<br>I want it to re-execute the custom command any time any of the files in ${rsm_input_files} changes.<br><br><font face="&#39;courier new&#39;, monospace"># files also specified in resources.rsm<br>set(rsm_input_files<br>

    textures/default_blank.png<br>    scripts/process_images.py<br>    scripts/misc.py<br>)<br><br># Make all deps into absolute paths<br>set(rsm_files_as_deps &quot;&quot;)<br>foreach (_rsm_file ${rsm_input_files})<br>    list(APPEND rsm_files_as_deps &quot;${CMAKE_CURRENT_SOURCE_DIR}/${_rsm_file}&quot;)<br>

endforeach (_rsm_file)<br><br>set(rsm_infile &quot;resources.rsm&quot;)<br>set(rsm_outfile &quot;${CMAKE_CURRENT_BINARY_DIR}/resources/resources.rsmc&quot;)<br>add_custom_command(<br>    OUTPUT ${rsm_outfile}<br>    DEPENDS ${rsm_infile} ${rsm_files_as_deps}<br>

    COMMANDS ${TOOLS_PATH}/bin/rsmc.exe<br>    ARGS -i ${rsm_infile} -o ${rsm_outfile} -v 0<br>    VERBATIM<br>)<br></font><br>This works when ${rsm_infile} changes, but not when the files in ${rsm_input_files} (or, rather, ${rsm_files_as_deps}) change.<br>

<br>What am I missing?<br><br>Thanks,<br>  Mike
</blockquote></div><br></div>