[cmake-developers] CPack: GetPrerequisites: cross-compiling from Linux to Windows

Dominik Schmidt domme at tomahawk-player.org
Tue Mar 6 06:26:58 EST 2012


Hey,


I worked on a patch for supporting dep-tracking with GetPrequesites when
cross-compiling for Windows with MinGW.

While doing this I noticed neither WIN32 nor CMAKE_CROSSCOMPILING are
defined at CPack time, why?
This is the reason my code in the patch is not in the WIN32 block above and
I couldn't guess the gp_tool correctly.

A hardcoded list of .dll names is for sure not really elegant, but I don't
know of any way to check if a required .dll is a windows system library. On
Linux of course there are no Windows system dlls in a certain folder and
the absence of such a dll doesn't mean anything either because an import
lib (.dll.a usually) is enough to link against.

The patch is probably not ready to be upstreamed but I'm happy to fix
issues or follow a nicer approach if you point me to it.

Best regards,
Dominik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120306/dd3f17cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win-x-deptracking.diff
Type: text/x-patch
Size: 2569 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120306/dd3f17cc/attachment-0002.bin>


More information about the cmake-developers mailing list