<br><br><div class="gmail_quote">On Sat, Aug 7, 2010 at 9:44 AM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><div></div><div class="h5">On Sat, Aug 7, 2010 at 9:26 AM, Chris Wolf <span dir="ltr"><<a href="mailto:cw10025@gmail.com" target="_blank">cw10025@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><div></div><div><br>
<br>
On 8/7/10 7:14 AM, Eric Noulard wrote:<br>
> 2010/8/7 Chris Wolf <<a href="mailto:cw10025@gmail.com" target="_blank">cw10025@gmail.com</a>>:<br>
>> On 8/6/10 8:55 PM, Eric Noulard wrote:<br>
>>><br>
>>> Did you try the command line?<br>
>>><br>
>>> cpack -D CPACK_PACKAGING_INSTALL_PREFIX="/opt" -G DEB<br>
>>><br>
>>> it works for me.<br>
>>><br>
>>> if it works for you may be<br>
>>> CPACK_PACKAGING_INSTALL_PREFIX is set to late<br>
>>> in the CMakeLists.txt?<br>
>>><br>
>><br>
>> Yes, I tried that about 8 hours ago: <a href="http://www.cmake.org/pipermail/cmake/2010-August/038785.html" target="_blank">http://www.cmake.org/pipermail/cmake/2010-August/038785.html</a><br>
>><br>
>> I have to say NOW it's working. Sorry - I suppose I was changing too many things at one back then<br>
>> and I was missing something.<br>
>><br>
>> Ok, this issue is resolved, thank you.<br>
><br>
> Good to know.<br>
><br>
> [...]<br>
>><br>
>> Sorry to beat a "deadhorse", since I see this has already been discussed:<br>
>><br>
>> <a href="http://www.mail-archive.com/cmake@cmake.org/msg16180.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg16180.html</a><br>
>><br>
>> I think that guy had a good proposal - being able to control path prefixes<br>
>> at a per/generator level. I guess for now, I can just run cpack multiple<br>
>> times with path/generator options on the command line.<br>
><br>
> I think you are right, command line is the current best way to go.<br>
> Now having a Generator Specific<br>
> CPACK_<GEN>_PACKAGING_INSTALL_PREFIX<br>
> wouldn't be that difficult to implement.<br>
><br>
> Now when enough [wo]man power will be given in<br>
> <a href="http://public.kitware.com/Bug/view.php?id=7000" target="_blank">http://public.kitware.com/Bug/view.php?id=7000</a><br>
> this can be discussed.<br>
><br>
> Re-read the bug comments and may be add your ideas there.<br>
><br>
> And I do not think the horse is dead, we are merely waiting<br>
> for a jockey for ridding bug #7000 :-)<br>
><br>
><br>
<br>
</div></div>Ok, I added a note to this bug with an example proposed code change. If it<br>
looks good, I can try it myself and if it works I can submit patches.<br>
<br>
Let me know, thanks,<br>
<font color="#888888"><font color="#000000"><font color="#888888"><br></font></font></font></blockquote><div><br></div></div></div>You can already do what you propose with that change today: in a <span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">CPACK_PROJECT_CONFIG_FILE file. (Without making any C++ changes and without waiting for resolution of issue #7000...).</span></div>
<div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Inside that file, you can inspect the value of CPACK_GENERATOR and set/override other CPACK_* variables. In this case, you would have as many if() blocks as needed to set CPACK_PACKAGING_INSTALL_PREFIX to whatever value you want for each generator.</span></div>
<div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">The </span><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">CPACK_PROJECT_CONFIG_FILE file is included *at cpack time* and is intended to give you the hook you need to do generator specific stuff.</span></div>
<div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Perhaps the proposed change is still a good one and would make this task easier. Although it seems silly to me to invent a bunch of new variables when there's already a technique that could be used to achieve the task today. We already, as you have observed, have enough "prefix" variables floating around. I'm not sure adding more is the way to go.</span></div>
<div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br>
</span></div><div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">HTH,</span></div><div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">David</span></div>
<font color="#888888">
<div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div>
</font></blockquote></div><br><div><br></div><div>And.... by the way. Sorry this is all so confusing (although it's not really my fault...) :-)</div><div><br></div><div>It is the way it is because of favoring "backwards compatibility" over simplicity. And now we have a bit of a morass in there.</div>
<div><br></div><div>So: we invented a way to override the stuff in this <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">CPACK_PROJECT_CONFIG_FILE so that the defaults would still work the same way they always have, but there would be a way to make sane installers anyhow. But, I admit, it is confusing and difficult to get up to speed from zero.</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br>
</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Cheers,</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">David</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div>