[CMake] cmake and wxwidgets on windows

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Mon Nov 3 06:35:09 EST 2008


On Mon, Nov 3, 2008 at 5:27 AM, John <dbgtjp at hotmail.com> wrote:
> Werner Smekal <smekal at ...> writes:
>
>>
>> Hi John,
>>
>> > hi Miguel,
>> >
>> > seems that I resolved the problem with CMake not finding
>> > wxWidgets.
>> > There must have been a problem while building wxWidgets
>> > on my machine.
>> > As I installed wxPack now, CMake finds wxWidgets.
>>
>> A 400mb download is just an overkill if you only want to use one
>> compiler. They also use MinGW 4.2.1 which seems to be the source of
>> your problems (you very likely use MinGW 3.4.5) - also this version of
>> MinGW is not a good one.
>>
>> I described how to compile and use the wxWidets library for the plplot
>> library (which uses cmake), but that should also work for you:
>>
>> http://www.miscdebris.net/plplot_wiki/index.php?title=WxWidgets
>>
>> if you have MinGW properly configured in a Windows CLI this should
>> work without problems for you - and if not I would be interested in
>> why this cookbook didn't work.
>>
>> Regards,
>> Werner
>>
>
> hi Werner,
>
> I've got a question regarding your cookbook. The strange thing is that CMake
> finds wxwidgets for some project, but not for all.
>
> I tried to build the minimal sample of wxwidgets to proofe if my code is the
> problem. but here CMake says wxwidgets not found, whereas in my code directory
> CMake finds wxwidgets.
>
> Do you know why that could be?
>
> I used the CMakeLists.txt from here:
> http://wiki.wxwidgets.org/CMake
> and tried several variants to make minial.cpp work.

John,

I don't think the following setting is appropriate for your platform:

SET(CMAKE_FIND_LIBRARY_PREFIXES "")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")

Also, the following line is deprecated:

SET(wxWidgets_USE_LIBS base core gl net)

you should rather use:

FIND_PACKAGE(wxWidgets REQUIRED base core gl net)

Now, if you want help debugging your problem, you need to stay on
track and provide the information necessary for me to determine what
might be the problem. After reviewing the output from the uncommented
debug macros, I asked you for the directory dump so that I can see
what is there and why it is not finding base and core. Please send
that information.

If there is a bug in the FindwxWidgets module, I will apply a patch to solve it.

--Miguel


More information about the CMake mailing list