Hey Eric,<br><br>thanks for the quick reply!<br><br><div class="gmail_quote">On Tue, Mar 6, 2012 at 1:16 PM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@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 class="im">
> While doing this I noticed neither WIN32 nor CMAKE_CROSSCOMPILING are<br>
> defined at CPack time, why?<br>
<br>
</div><br>May be because no one did really tackle the cross-packaging problem?<br>
Cross-compiling is one thing, cross packaging is another one<br>
(which may be difficult or impossible in the general case).<br><div class="im"></div></blockquote><div><br>Ah okay :-)<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">
> This is the reason my code in the patch is not in the WIN32 block above and<br>
> I couldn't guess the gp_tool correctly.<br>
<br>
</div>In order to be sure that nothing else is breaking you can try to<br>
[manually] add the missing definition in the CPackConfig.cmake file.<br>
This file is loaded by CPack at CPack-time so that any definitions in there<br>
will be seen during CPack run.<br></blockquote><div><br>Went fine.<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
An alternative would be to do it in a CPack Project Config file:<br>
<a href="http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#Overall_usage_.28common_to_all_generators.29" target="_blank">http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#Overall_usage_.28common_to_all_generators.29</a><br>
</blockquote><div><br>Might make sense, indeed. That way you could explicitly say if you want to cross-package or not.<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

By the way how does GetPrerequisite get called ? Is it does through<br>
BundleUtilities?<br>
I'm not using those so, are they called at [CPack-]install time ?<br><div class="im"></div></blockquote><div><br>Yes. I'm using DeployQt4, which uses BundleUtilities, which use GetPrerequisites.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">
> A hardcoded list of .dll names is for sure not really elegant, but I don't<br>
> know of any way to check if a required .dll is a windows system library. On<br>
> Linux of course there are no Windows system dlls in a certain folder and the<br>
> absence of such a dll doesn't mean anything either because an import lib<br>
> (.dll.a usually) is enough to link against.<br>
><br>
> The patch is probably not ready to be upstreamed but I'm happy to fix issues<br>
> or follow a nicer approach if you point me to it.<br>
<br>
</div>Before going on may be you could explain us what kind of<br>
cross-packaging your are targeting:<br>
NSIS, Archive generator, etc...<br></blockquote><div><br>NSIS is the one I'm aiming for :-)<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Setting WIN32 and/or CMAKE_CROSSCOMPILING may be done in CPack list interpreter<br>
but it remains to be seen whether it would be enough in order to<br>
achieve what you want.<br></blockquote><div><br>I think so, it already works when gp_tool is manually set to objdump!<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="HOEnZb"><font color="#888888">
--<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>
</font></span></blockquote></div><br>Best regards,<br>Dominik<br>