On Tue, Dec 9, 2008 at 4:33 PM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.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><div></div><div class="Wj3C7c">On Tue, Dec 9, 2008 at 4:25 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><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>Robert Dailey wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
After much research, I&#39;ve found out that CMake cannot provide a custom command (Post build event) to a specific configuration in the case where CMake is used to generate a multi-configuration target, such as a visual studio project. This is a HUGE problem for me. Are there any work-arounds for this issue? Does this issue plan to be addressed in a future release (Hopefully soon)?<br>


<br>
</blockquote>
<br></div>
Exactly what are you trying to copy? &nbsp;I might be able to figure out a workaround if I had a better idea of what you were doing.<br>
<br>
(please keep the example &nbsp;small... :) &nbsp;)</blockquote></div><br></div></div>Sure. Sorry for the lack of details.<br><br>I have a directory that contains DLL files that I need to copy to the
directory at which my executable is built. However, the DLL files that
I copy over are different depending on the configuration that was used
to build the executable. For example, if I&#39;ve built my executable using
the DEBUG configuration, I need to copy over DLL files named foo_d.dll,
bar_d.dll. If RELEASE was used to build the executable, then I need to
copy over foo.dll and bar.dll. Since the debug/release executables are
placed in different directories by CMake when they are built, the
destination location for the DLLs also changes across configurations as
well.<br>
</blockquote></div><br>I actually did a little thinking and I came up with this:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add_custom_command( TARGET ${component_project_name}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POST_BUILD<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMMAND &quot;depends.py&quot; ARGS &quot;$(ConfigurationName)&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br><br>Of course this only works for visual studio projects, but it does accomplish what I want. The only downside is that I have to put the DLL copy logic in the python script instead of keeping it centralized within CMake.<br>