MantisBT - CMake
View Issue Details
0006478CMakeCCMakepublic2008-02-29 02:242008-06-16 14:28
Werner 
Miguel Figueroa 
normalminoralways
closedfixed 
 
 
0006478: Modul FindwxWidgets.cmake doesn't work with MinGW/native Windows CLI
If MinGW is used in a native Windows CLI (opposed of using MinGW in MSys environment) FindwxWidgets.cmake tries to find the wxWidgets library the unix way (wx-config) which is not successful.
The solution of this problem is to change the code part

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)

to something like

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

or maybe nicer would be

IF(WIN32 AND NOT CYGWIN AND NOT MSYS)
 SET(WIN32_STYLE_FIND 1)
ELSE(WIN32 AND NOT CYGWIN AND NOT MSYS)
 SET(UNIX_STYLE_FIND 1)
ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS)

since cygwin and msys are the only cases on windows where the unix_style_find way would work. Though I'm not sure if cygwin and msys are set but I'm quite sure.

Thanks,
Werner
No tags attached.
Issue History
2008-02-29 02:24WernerNew Issue
2008-03-01 17:01Miguel FigueroaStatusnew => assigned
2008-03-01 17:01Miguel FigueroaAssigned To => Miguel Figueroa
2008-06-16 14:28Miguel FigueroaStatusassigned => closed
2008-06-16 14:28Miguel FigueroaNote Added: 0012349
2008-06-16 14:28Miguel FigueroaResolutionopen => fixed

Notes
(0012349)
Miguel Figueroa   
2008-06-16 14:28   
Commited the following change in rev. 1.21.

IF(WIN32 AND NOT CYGWIN)
  SET(wxWidgets_FIND_STYLE "win32")
ELSE(WIN32 AND NOT CYGWIN)
  IF(UNIX)
    SET(wxWidgets_FIND_STYLE "unix")
  ENDIF(UNIX)
ENDIF(WIN32 AND NOT CYGWIN)

Now, MinGW, Windows (not cygwin), and MSYS will choose win32 style
and unix (including cygwin and apple osx) will choose unix style.

--Miguel