I was using the LIST_SEPARATOR argument in the wrong place when I tried it. This works as needed:<div><br></div><div>"""</div><div><div>cmake_minimum_required(VERSION 2.8)</div><div>include(ExternalProject)</div>
<div><br></div><div>set(libpath "MORE;BETTER;PATHLIST")</div><div>string(REPLACE ";" "^^" libpath "${libpath}")</div><div>message("libpath: ${libpath}")</div><div>ExternalProject_Add(</div>
<div> "hello_world"</div><div> URL "C:/temp"</div><div> LIST_SEPARATOR ^^</div><div> BUILD_COMMAND ${CMAKE_BUILD_TOOL} /p:VCBuildAdditionalLinkLibraryPaths="${libpath}"</div><div> ) </div>
<div>"""</div><br><div class="gmail_quote">On Wed, Feb 15, 2012 at 4:02 PM, Isaiah Norton <span dir="ltr"><<a href="mailto:isaiah.norton@gmail.com">isaiah.norton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, <div><br></div><div>Apologies in advance if I missed/misread something in the FAQ and the email threads I've found so far about semicolons. I am using Windows 7 64-bit, CMake 2.8.7, and "Visual Studio 10 Win64" generator with msbuild, VC++ Express 2010, Windows SDK7.1.</div>
<div><br></div><div>I need to pass a windows-style path list through ExternalProject_Add and ExternalProject_Add_Step. Minimal example:</div><div><br></div><div>"""</div><div><div>cmake_minimum_required(VERSION 2.8)</div>
<div>include(ExternalProject)</div><div><br></div><div>ExternalProject_Add(</div><div> "hello_world"</div><div> URL "C:/temp"</div><div> BUILD_COMMAND ${CMAKE_BUILD_TOOL} "/p:VCBuildAdditionalLinkLibraryPaths=MORE;BETTER;PATHLIST"</div>
<div> ) </div></div><div>"""</div><div><br></div><div>When I generate the project, the path list separator is converted to spaces, so when it gets to VCBuild from msbuild it is interpreted as multiple arguments and fails.</div>
<div><br></div><div>""" from hello_world.vcxproj:</div><div>...</div><div><div>if %errorlevel% neq 0 goto :cmEnd</div><div>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:VCBuildAdditionalLinkLibraryPaths=MORE BETTER PATHLIST</div>
<div>if %errorlevel% neq 0 goto :cmEnd</div></div><div>"""</div><div><br></div><div>In the real project, I am using $ENV{LIB} (="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\X64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64")</div>
<div><br></div><div>I've tried string(REPLACE..) for escaping in various ways, but at best I end up with extra slashes and at worst no spaces between paths. I also tried permutations of "-D" and "LIST_SEPARATOR" to no avail.</div>
<div><br></div><div>Thanks very much for any suggestions.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Isaiah</div>
</font></span></blockquote></div><br></div>