<div>Hello,</div><div><br></div><div>I&#39;m using CMake custom commands to copy files from a source directory to a project binary one. The copying commands itself looks this way:</div><div><br></div><div>add_custom_command( OUTPUT<span class="Apple-tab-span" style="white-space:pre">        </span>&quot;${dest_file}&quot;</div>

<div><span class="Apple-tab-span" style="white-space:pre">                                </span>COMMAND <span class="Apple-tab-span" style="white-space:pre">        </span>&quot;${CMAKE_COMMAND}&quot; -E copy &quot;${src_file}&quot; &quot;${dest_file}&quot;</div>

<div><span class="Apple-tab-span" style="white-space:pre">                                </span>DEPENDS &quot;${src_file}&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>)<span class="Apple-tab-span" style="white-space:pre">                </span></div>

<div><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div>After all &quot;add_custom_command&quot; calls a custom target is created that depends on all copied files</div><div><span class="Apple-tab-span" style="white-space:pre"><br>

</span></div><div><div>add_custom_target( copy_files_targ ALL DEPENDS ${dest_file1} ${dest_file2}  )</div></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div><span class="Apple-tab-span" style="white-space:pre">A</span>fter generation of Visual Studio&#39;s solution and project files I found out that a whole bunch of .rule had been created in the output directory. </div>

<div><br></div><div>So, while the source dir has the following contents: config1.xml, config2.xml, config3.xml, the destination directory contains two times more files: config1.xml, config2.xml, config3.xml and config1.xml.rule, config2.xml.rule, config3.xml.rule. </div>

<div><br></div><div>I don&#39;t want to have all those additional files in the destination folder. </div><div>So the question is: is there a way to put &quot;.rule&quot; files into another dir?</div><div><br></div><div>Thanks in advance.</div>

<div><span class="Apple-tab-span" style="white-space:pre"><br></span></div>