<div dir="ltr"><div>Solved the problem.</div><div><br></div>Further verification revealed that, when I build "PACKAGE", it generates a "install_manifest.txt" file in my build directory. It contains absolute paths to copy of install files I mentioned using "install targets" command. This temporary directory and its files are also created when we build the "PACKAGE" target. <div>
<br></div><div>What caused all these problem is, I misread the "INSTDIR" in SetOutPath command and "INST_DIR" in File command as the *same*</div><div><br></div><div>  SetOutPath "$INSTDIR"</div>
<div><br></div><div>  File /r "${INST_DIR}\*.*" <br><div><br></div><div>tracing the INST_DIR value revealed that, it is defined in the template as !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"<br></div>
<div><br></div><div><br></div><div>Thanks a lot,</div><div>  Lloyd</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 2:05 PM, Lloyd <span dir="ltr"><<a href="mailto:lloydkl.tech@gmail.com" target="_blank">lloydkl.tech@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div><br>
</div>I am no NSIS expert so I can't imagine why 'File /r "${INST_DIR}\*.*"'<br>
could possibly do ???<br></blockquote><div><br></div><div><br></div></div><div><div>About the file command the NSIS documentation says this:</div><div>    Adds file(s) to be extracted to the current output path ($OUTDIR).<br>
</div>
<div>    If the /r switch is used, files and directories are added recursively.</div></div><div><br></div><div>That is, the File command copies the files (all files as it is *.*) specified in the path ${INST_DIR}\*.* recursively to the current set output directory of the NSIS. The value of the INST_DIR variable is the directory which the user has selected at install time.</div>
<div class="">
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
So I guess that if your template does not contain such command you<br>
either need it<br></blockquote><div><br></div></div><div>I tried adding @CPACK_NSIS_FULL_INSTALL@, and it generated File /r "${INST_DIR}\*.*" but this causes NSIS an error. Now I am in the assumption that CMake copies all the files hierarchically to some temp directory and from that location it does the copy (this is only a wild guess).</div>
<div class="">
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
(and should use CPACK_NSIS_FULL_INSTALL in your template) or replace<br>
it with something more appropriate to you case.<br><span><font color="#888888"><br></font></span></blockquote><div><br></div><div><br></div></div><div>What I don't understand is, what happens to the "install targets" commands in the CMake file on windows platform</div>

<div>      </div></div></div></div>
</blockquote></div><br></div>