[CMake] Bug+Fix in FindwxWidgets.cmake

Werner Smekal smekal at iap.tuwien.ac.at
Mon Dec 4 16:32:35 EST 2006


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)

This should be now correct.

Thanks,
Werner

-- 
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: smekal at iap.tuwien.ac.at
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
        +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499



More information about the CMake mailing list