<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hi,</div>
<div>&nbsp;</div>
<div>I am trying to set up a customized installation directory via CPack on Windows.</div>
<div>&nbsp;</div>
<div>It should be pretty straightforward by setting something like:</div>
<div>&nbsp;&nbsp;&nbsp; set(CPACK_NSIS_INSTALL_ROOT &quot;D:&quot;)</div>
<div>&nbsp;&nbsp;&nbsp; set(CPACK_PACKAGE_INSTALL_DIRECTORY &quot;mylib&quot;)</div>
<div>should get a path of &quot;D:\mylib&quot; , but surprisingly it doesn't work. </div>
<div>&nbsp;</div>
<div>I added that two lines based on the example in <a href="http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack"><font color="blue"><u>http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack</u></font></a> </div>
<div>then got this path: &quot;C:\Users\myname\Documents\mylib\&quot;, apparently CPACK_NSIS_INSTALL_ROOT is not set.</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>Then I tried many options and found that the CPACK_NSIS_INSTALL_ROOT must contains a '/' to make it working:</div>
<div>By adding following:</div>
<div>&nbsp;&nbsp;&nbsp; set(CPACK_NSIS_INSTALL_ROOT &quot;D:/&quot;)</div>
<div>&nbsp;&nbsp;&nbsp; set(CPACK_PACKAGE_INSTALL_DIRECTORY &quot;mylib&quot;)</div>
<div>will get path: &quot;D:/\mylib\&quot;</div>
<div>&nbsp;</div>
<div>This is weird because this path is absolutely not a valid path.</div>
<div>&nbsp;</div>
<div>How can I get a path of &#8220;D:\mylib&#8221; ?</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>Thanks,</div>
<div>Deqing</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div><font face="Times New Roman">&nbsp;</font></div>
</span></font>
</body>
</html>