[CMake] FindwxWidgets update (for MinGW)

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Tue Jun 17 09:49:00 EDT 2008


On Tue, Jun 17, 2008 at 3:16 AM, Werner Smekal wrote:
>> This makes Windows (non-cygwin) and MinGW choose the windows style
>> search and Unix (including cygwin and apple osx) to choose the unix
>> style search (based on wx-config).
>>
>> MSYS will choose the windows style search also. Now, wxWidgets and
>> MSYS users could help me out here to decide whether this is the
>> correct default or should I change it so that MSYS uses unix style
>> search (this means that wx-config must be installed)? Or can MSYS
>> shell work well with a regular windows wxWidgets installation (i.e.,
>> in C:/wxWidgets-2.4.8)?
>
> In MSYS you compile wxWidgets with the automake build system and obtain a
> wx-config binary. So the above fix would not work for MSYS. MSYS has access
> to a usual wxWidgets installation, but not via C:/wx... - the drives are
> accessed by /c/wxWidgets-2.4.8. But according to the installations
> instructions of wxWidgets for MSYS, where the usual configure/make process
> is recommended I would stick in the MSYS case to the unix find_style.
>
>>
>> If it can go either way, then I will add a mechanism with a default
>> choice, but which can be overridden by the user.
>
> That I'm not sure. And it wouldn't make too much sense, since MSYS is by
> definition the minimal system to use the unix configure system. If the user
> doesn't want that, he should use the Windows CLI (pure MinGW), since he
> doesn't use the capabilities of MSYS anyway.

If the wxWidgets instructions for MSYS recommend the configure/make
process, then I'll just keep it simple and let MSYS build use the unix
style search with the following change:

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

However, as I understand it, you should not be installing too much
into the msys system (certainly not something like wxWidgets) since it
is meant to be a Minimal SYStem to aid the developers in using the
bash shell, autotools, and a few other POSIX tools.

But if people are using it that way then FindwxWidgets should find it
that way, I guess.

Thanks for the info.

--Miguel


More information about the CMake mailing list