[CMake] Problem using FindwxWidgets.cmake

user790 user790 user790 at gmail.com
Sat May 9 11:31:27 EDT 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090509/529ebe21/attachment.htm>


More information about the CMake mailing list