[CMake] Problem using FindwxWidgets.cmake

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sat May 9 17:27:01 EDT 2009


On Sat, May 9, 2009 at 11:31 AM, user790 user790 wrote:
> I am trying to use CMake to configure a very simple project that uses
> wxWidgets, and I am running into a problem. The wxUSE_GUI flag is set to 0
> in the Makefile generated by CMake and I therefore cannot use the GUI part
> of wxWidgets.
>
> Diving into FindwxWidgets.cmake, I see that compilation options are obtained
> through wx-config. Options to wx-config are based on only four flags that I
> can set or not in my CMakeLists.cmake, which are
> wxWidgets_USE_{DEBUG,UNICODE,UNIVERSAL,STATIC}.
>
> The problem is that on my Ubuntu 9.04, there are two wxWidgets configuration
> in /usr/lib/wx/config. One is base-unicode-debug-2.8, the other is
> gtk2-unicode-debug-2.8. The base configuration (which cannot be used for GUI
> building) is the default configuration. And unfortunately, I cannot
> discriminated both configurations with the four aforementionned parameters.
> I am able to differentiate them only with the "--toolkit" option of
> wx-config. But I cannot add this option to the wxWidgets_SELECT_OPTIONS
> variable of FindwxWidgets.cmake.
>
> Is this a "bug", or am I missing something? What could be a work-around? I
> quicklu browsed the wx-config script and it seems to me that the setting of
> 'base' as the default toolkit is more or less hard coded in it.
>
> Thanks,
>
> Paul

Well, it is not so much a bug as it is an unsupported use case. I have
only added select options for boolean paramenters (i.e., debug,
unicode, universal, static). I will try to figure out a clean way to
add support for this.

Could you submit this to the cmake bug tracker:

http://www.vtk.org/Bug/main_page.php

Please add the exact wx-config command line that gives you the correct
results for you.

--Miguel


More information about the CMake mailing list