<span class="Apple-style-span" style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">You're welcome.<div><br></div><div>Be careful with that technique, though.</div><div><br></div>
<div>If somebody configures your project with CMAKE_INSTALL_PREFIX set to C:/Put/Stuff/Here, they'll end up with your main install tree underneath that, and then all your custom dir files in "C:/Put/Stuff/CustomDir".</div>
</span><div><br></div><br><div class="gmail_quote">On Tue, May 22, 2012 at 3:31 PM, <span dir="ltr"><<a href="mailto:norulez@me.com" target="_blank">norulez@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I got it to work.<br>
<br>
Under windows/NSIS I set the destination to "../CustomDir" instead of $CustomDir.<br>
With this and a custom nsis script which knows the location it is possible to run CPack.<br>
<br>
In the NSIS script I've the following<br>
Var $CustomDir="@CPACK_TEMPORARY_DIRECTORY@\..\CustomDir"<br>
<br>
After this I can install files from this directory too.<br>
<br>
The directory content after the preinstall:<br>
.../_CPack_Packages/win32/NSIS/myproject.1.0.0.1/<br>
.../_CPack_Packages/win32/NSIS/CustomDir/<br>
.../_CPack_Packages/win32/NSIS/project.nsi<br>
.<br>
.<br>
.<br>
<br>
@Eric, @David: Thank you very much<br>
<br>
Best Regards<br>
<br>
<br>
Am 22.05.2012 um 00:38 schrieb Eric Noulard <<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>>:<br>
<div class="HOEnZb"><div class="h5"><br>
> 2012/5/21 David Cole <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>>:<br>
>> On Mon, May 21, 2012 at 2:05 PM, <<a href="mailto:norulez@me.com">norulez@me.com</a>> wrote:<br>
>>><br>
>>> But what about other systems like linux. If I have an executable and<br>
>>> shared libraries for example.<br>
>>> Then it is possible to install it under /opt/myproject, but it is not<br>
>>> possible to install the executable under /usr/bin and the shared libraries<br>
>>> under /usr/lib? Or did I misunderstood something?<br>
>><br>
>><br>
>> But you don't build an NSIS installer based on those.<br>
><br>
> And installing lib in /usr/lib and exe in /usr/bin IS possible<br>
> because the 2 path shares the /usr prefix.<br>
><br>
> On Linux if you build an RPM or DEB package which contains various<br>
> prefix (/usr /opt etc..) you either get a non relocatable package<br>
> or decide that some files are "special" like config files.<br>
><br>
> but David is right this does not work with NSIS.<br>
><br>
>>> Sorry, for simple installers the default NSIS template is great, but for<br>
>>> customized ones it seems to be very difficult, isn't it?<br>
><br>
> As difficult as it is with NSIS alone :-]<br>
><br>
>> Yes, you're correct. It takes some effort if you are not installing<br>
>> everything underneath the directory that the end user chooses for your final<br>
>> location.<br>
>><br>
>> It's quite good for "simple installers" and "component-based installers" --<br>
>> beyond that, and especially putting things outside the location chosen by<br>
>> the end user ... you're on your own.<br>
><br>
> If you do have 2 separate unrelated installation prefixes<br>
> may be you can just build 2 NSIS installers<br>
> (which contains only one prefix)<br>
> using CPack twice out of 2 differents configurations of the same project<br>
><br>
> Or craft your own project.nsi file.<br>
><br>
> --<br>
> Erk<br>
> Le gouvernement représentatif n'est pas la démocratie --<br>
> <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a><br>
</div></div></blockquote></div><br>