[CMake] Problem with FindwxWidgets.cmake

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Tue Jan 27 15:21:34 EST 2009


On Mon, Jan 26, 2009 at 8:49 PM, Robert Dailey wrote:
> Hi,
>
> I'm currently using CMake 2.6.2 and the FindwxWidgets.cmake module that
> comes pre-packaged with the installation doesn't seem to properly work on
> windows. I set CMAKE_PREFIX_PATH so that it would be able to find the
> wxWidgets in a custom location. It does find wxWidgets_ROOT_DIR, but does
> not find wxWidgets_LIB_DIR. We are using a unicode build of wxWidgets on
> Windows, and our lib directory looks like:
>
> ${wxWidgets_ROOT_DIR}/lib/mswu/wx/setup.h
>
> However, look at this snippet of code from FindwxWidgets.cmake:
>
>       FIND_PATH(wxWidgets_LIB_DIR
>         NAMES msw/build.cfg mswd/build.cfg
>         PATHS
>         ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll   # prefer shared
>         ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib
>         DOC "Path to wxWidgets libraries?"
>         NO_DEFAULT_PATH
>         )
>
> Notice it is only checking in "msw" and not "mswu". Also, I do not have a
> build.cfg file (I only keep relevant files inside my wxWidgets directory).
> This file is enormous and complex, so I'm not even sure if this code is even
> being used or if it matters.

Hello Robert,

This was a regression error while trying handle MinGW. You should only
need to replace your FindwxWidgets.cmake with the latest version
available from the following link:

http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/FindwxWidgets.cmake?root=CMake&view=markup

Of course, setting the wxWidgets_LIB_DIR manually in the gui or
command line should also work.

--Miguel


More information about the CMake mailing list