[CMake] Bug in FindwxWidgets.cmake regarding MinGW

Werner Smekal smekal at iap.tuwien.ac.at
Thu Feb 28 09:21:44 EST 2008


Hi list,

there is a bug in FindwxWidgets.cmake if using the MinGW compiler on 
Windows CLI (not in msys). At the top of FindwxWidgets.cmake we find

IF(WIN32)
   SET(WIN32_STYLE_FIND 1)
ENDIF(WIN32)
IF(MINGW)
   SET(WIN32_STYLE_FIND 1)
   SET(UNIX_STYLE_FIND 0)
ENDIF(MINGW)
IF(UNIX)
   SET(UNIX_STYLE_FIND 1)
ENDIF(UNIX)

so if we use the MinGW compiler the script always tries to find the 
wxWidgets library the "unix"-way, aka using wx-config. But this is only 
true if the MinGW compiler is used in the msys environment. If you use 
the MinGW compiler in the "normal" Windows CLI environment we need to 
find the wxWidgets library the "WIN32_STYLE_FIND" way. Since if we are 
in the msys environment cmake sets the MSYS variable I would suggest to 
change the lines above to

IF(WIN32)
   SET(WIN32_STYLE_FIND 1)
ENDIF(WIN32)
IF(UNIX OR MSYS)
   SET(UNIX_STYLE_FIND 1)
ENDIF(UNIX)

I could file a bug report if necessary.

Regards,
Werner

-- 
Dr. 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