Add quotation mark in CMake string
<p>I am using CMake to create and build my project solution. i am using the following command to add a post build event to copy a .tlb from the local bin to the program bin.</p>

<pre><code>ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD COMMAND xcopy /D /Y "${CMAKE_SOURCE_DIR}LocalBin\\example.tlb" "${CMAKE_SOURCE_DIR}ProgramBin\\$&lt;CONFIGURATION&gt;\\")
</code></pre>

<p>When this adds the command to the project properties , it is added as </p>

<p>xcopy /D /Y LocalBin\example.tlb ProgramBin\Debug\</p>

<p>However this gives me an error. Exited with Code 4.</p>

<p>If i go into the project properties and hack the command line and change it to add " "</p>

<p>xcopy /D /Y "LocalBin\example.tlb " "ProgramBin\Debug\"</p>

<p>It works.</p>

<p>Is there a way i can change the CMake add custom command to include the " " in the actual command line so it will work and there is no need to manually change the project properties.</p>