[CMake] CMake 2.4 (8) & WxWidgets + RichText Pt 2
Eric Torstenson
eric.torstenson at mac.com
Mon Apr 21 13:36:54 EDT 2008
Hi Miguel,
Well, with this in mind, I did a bit of playing, and decided that the
problem wasn't so much that FindwxWidgets.cmake needed to be changed,
but instead, I was calling it incorrectly.
What I had to do was as follows:
SET (wxWidgets_USE_LIBS aui richtext adv html core xml base xrc qa net)
SET (wxWidgets_FIND_COMPONENTS true)
FIND_PACKAGE(wxWidgets)
IF (wxWidgets_FOUND)
INCLUDE (${wxWidgets_USE_FILE})
#Project name is just the project being built
TARGET_LINK_LIBRARIES(${ProjectName} ${wxWidgets_LIBRARIES})
ENDIF (wxWidgets_FOUND)
Since, by default, FIND_COMPONENTS is false, it was using what you
described as the windows mechanism. Which did work after I added those
two components to the underlying cmakefiles, but what I really needed to
do was set it up so your module would find them using the other logic.
So, I think I finally got it straightened out.
Thanks,
Eric
> Hello Eric,
>
> I'm glad to here this worked. Now, I would like to understand the
> problem, so that I can fix the FindwxWidgets module. Can you post
> exactly what chages did you make to the FindwxWidgets (a diff patch
> would be fine)?
>
> 1. In windows, it makes sense to add the richtext lib, because it
> relies on it to find all possible libraries. I suppose that you added
> it to the following line:
>
> FOREACH(LIB core adv aui html media xrc dbgrid gl qa)
>
> 2. In linux/unix, I am returning what the `wx-config --libs <libs>`
> returns. I believe that the problem you were having was due to a
> parsing bug, which should be fixed in the latest version. However, the
> above list wouldn't have helped. If the latest version still has the
> bug, then let me know so that I can explore the issue further.
>
> You can always find a latest version of the module for comparison at:
>
> http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/FindwxWidgets.cmake?root=CMake&view=markup
>
> Thanks in advance for the report,
> --Miguel
>
More information about the CMake
mailing list