[CMake] Bug+Fix in FindwxWidgets.cmake
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Dec 4 18:56:10 EST 2006
Hi,
Von: Werner Smekal <smekal at iap.tuwien.ac.at>
> Hi,
>
> in FindwxWidgets.cmake is a small bug regarding MinGW and MSys. From
> line 150 on there is
>
> IF(WIN32)
> SET(WIN32_STYLE_FIND 1)
> ENDIF(WIN32)
> IF(MINGW)
> SET(WIN32_STYLE_FIND 0)
> SET(UNIX_STYLE_FIND 1)
> ENDIF(MINGW)
> IF(UNIX)
> SET(UNIX_STYLE_FIND 1)
> ENDIF(UNIX)
>
> Problem here is that pure MinGW in Windows CLI ("MinGW Makefiles"
> Generator) needs WIN32_STYLE not UNIX_STYLE, since there is no wx-config
> in that case. Since from CMake 2.4.4 on (just read in the changelog)
> MSYS is defined for the MSys case, that bug is easy to fix,
>
> IF(MSYS)
> SET(WIN32_STYLE_FIND 0)
> SET(UNIX_STYLE_FIND 1)
> ENDIF(MSYS)
>
> and if I think about it, there is also a bug for cygwin, since here
> WIN32 and UNIX is 1, so both WIN32_STYLE_FIND and UNIX_STYLE_FIND would
> be 1 than, so to fix also that case we would need
>
> IF(WIN32)
> SET(WIN32_STYLE_FIND 1)
> ENDIF(WIN32)
> IF(MSYS OR UNIX)
> SET(WIN32_STYLE_FIND 0)
> SET(UNIX_STYLE_FIND 1)
> ENDIF(MSYS OR UNIX)
How about something like:
IF (WIN32)
... handle all win variants here
ELSE (WIN32)
... and all non-win variants here
ENDIF (WIN32)
Can you provide a ready-to-apply patch ?
I've never used wxWidgets, so I can't really comment on it.
Bye
Alex
--
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!
More information about the CMake
mailing list