On Wed, Dec 10, 2008 at 8:23 AM, David Cole <span dir="ltr">&lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote">On Tue, Dec 9, 2008 at 9:18 PM, Bill Hoffman <span dir="ltr">&lt;<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>....... If you did not want to use python, you could use cmake -DCONFIG=${CMAKE_CFG_INTDIR} -E myscript.cmake &nbsp; &nbsp;.......</div></blockquote><div><br></div><div>Make that:</div><div>cmake -DCONFIG=${CMAKE_CFG_INTDIR} -P myscript.cmake<br>

</div><div><br></div><div>-P for *p*rocess script, not -E</div></div></blockquote></div><br>Thanks for the help everybody, I really appreciate it! These DLL files are *not* built by CMake. They are third party libraries built elsewhere (On a different windows machine, even). I&#39;m a bit skeptical to put the copy logic in Python because it only makes our build system more complex. People who know CMake now have to learn Python in order to work with our build system.<br>
<br>The reason why I was passing in the configuration name itself and not the INTDIR is because I would be doing string compares on the configuration name itself to decide what libraries to copy over. A psuedo code example of what I&#39;m talking about follows:<br>
<br><span style="font-family: courier new,monospace;">if configuration == &quot;debug&quot; then</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; copy &quot;foo_d.dll&quot; to INTDIR</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; copy &quot;bar_d.dll&quot; to INTDIR</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">else if configuration == &quot;release&quot; then</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; copy &quot;foo.dll&quot; to INTDIR</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; copy &quot;bar.dll&quot; to INTDIR</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">end if</span><br><br>Note that in both the &#39;debug&#39; and &#39;release&#39; cases, the INTDIR will properly reflect the &quot;debug&quot; executable directory and the &quot;release&quot; executable directory, respectively.<br>