[CMake] wxWidgets on Win32 (MSW)

Werner Smekal smekal at iap.tuwien.ac.at
Tue May 20 04:07:38 EDT 2008


Hi Mathieu,

which cmake version are you using, the cygwin one or the native?

The responsible code in FindwxWidgets.cmake is

FIND_PATH(wxWidgets_ROOT_DIR
     NAMES include/wx/wx.h
     PATHS
       $ENV{wxWidgets_ROOT_DIR}
       $ENV{WXWIN}
 
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno 
Setup: App Path]"  # WX 2.6.x
       C:/
       D:/
       $ENV{ProgramFiles}
     PATH_SUFFIXES
       wxWidgets-2.8.7
       wxWidgets-2.8.6
       wxWidgets-2.8.5
[....]
       wxWidgets-2.5.2
       wxWidgets-2.5.1
       wxWidgets
     DOC "wxWidgets base/installation directory?"
     )

and since you don't tell cmake where it is (did you set the wxWIN 
environment variable?), it uses the HKEY_LOCAL thingy. This returns 
C:\lsfdhfdslfs and altough cygwin might be able to cope with the \ the : 
is definitely a separator for paths in cygwin, and therefore cmake looks 
in C and in /lsfdhfdslfs and will not find it. Therefore I would propose 
that you set the WXWIN variable to the correct path in cygwin style and 
then it might work. And that are exactly the reasons why I went away 
from mixing non-native tools with native tools. I don't like the Windows 
shell as well, but at least there are no such troubles.

HTH,
Werner

Mathieu Malaterre wrote:
> On Tue, May 20, 2008 at 3:02 AM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>> Werner Smekal wrote:
>>> Hi Mathieu,
>>>
>>> first I would use the standard Windows CLI and not cygwin, if you intend
>>> to use VC++ and NMake. I normally tell cmake where to find the correct
>>> version of wxWidgets via
>>>
>>> -DwxWidgets_LIB_DIR=path_to_lib_dir -DwxWidgets_CONFIGURATION=msw
>>>
>>> In addition regarding your output, this line
>>>
>>>  > wxWidgets_wxrc_EXECUTABLE:FILEPATH=wxWidgets_wxrc_EXECUTABLE-NOTFOUND
>>>
>>> suggests, that you need to add the path to wxrc to the standard PATH
>>> environment variable. But I don't use you combination of tools, and would
>>> also suggest not to do so. VC++ and NMake are native Win32 tools and there
>>> is no need to use cygwin.
>>>
>> However, there should not a problem using cygwin with nmake.  Most of my
>> cmake development is done with visual studio and cygwin gmake, used to be
>> nmake before dual core machines came out, and nmake does not handle parallel
>> builds.
> 
> I am also using cygwin/rxvt and have a bunch of scripts to init vars
> (INCLUDE/LIB...), I have been very pleased with them so far, and there
> is no way for me to start using the 'cmd' thingy....
> 
>> Is this a valid path on your machine:
>> WX_adv:FILEPATH=/wxWidgets-2.8.7/lib/vc_lib/wxmsw28_adv.lib ?
> 
> nope, it's is missing the c:/. Doing a sed solved my issue, but I
> really do not understand what is going on with cmake 2.6 during the
> inspection. This is on my laptop at home, and some of the network (Z:,
> Y: and X: were disconected at the time, but other than creating
> slowdown it should not affect cmake bahavior).
> 
>> Mathieu, where is wx*.lib located on your machine?
> 
> WX_adv:FILEPATH=c:/wxWidgets-2.8.7/lib/vc_lib/wxmsw28_adv.lib ?
> 
> works for me.
> 


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