[CMake] FindwxWidgets and wxpng
Miguel A. Figueroa-Villanueva
miguelf at ieee.org
Thu Dec 6 18:17:45 EST 2007
On Dec 6, 2007 6:05 PM, James Bigler wrote:
> James Bigler wrote:
> > In windows it looks for the library path by looking for the wxpng library:
> >
> > FIND_PATH(wxWidgets_LIB_DIR
> > NAMES wxpng.lib wxpngd.lib
> > PATHS
> > ${WX_ROOT_DIR}/lib/vc_lib # prefer static
> > ${WX_ROOT_DIR}/lib/vc_dll
> > DOC "Path to wxWidgets libraries?"
> > NO_DEFAULT_PATH
> > )
> >
> > There's nothing in the documentation that states I have to have compiled
> > wxpng for this to work. It seems like it should be using at least one
> > of the libraries that I asked it to look for (which didn't include
> > wxpng), such as base or core or mono.
> >
> > I'm using cmake 2.4.7 on win XP with wxWidgets 2.8.7.
Is the wxpng.lib an optional package? If so, I'll change it...
I had thought about using this, since both monolithic and multilib
versions would have it... What is the best thing to probe for then?
Probably I should put in the base and mono NAMES so that it can figure
it out everytime.
> In addition, it looks like I have to have these libraries:
>
> #useful common wx libs needed by almost all components
> SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
>
> So, if I didn't ask for them, whey are they required?
>
> # Always add the common required libs.
> LIST(APPEND wxWidgets_USE_LIBS ${wxWidgets_COMMON_LIBRARIES} )
>
> The unix version doesn't require these libraries, so why does the
> windows one require them?
The unix version uses wx-config. It is much easier to do things
through wx-config, because wx-config knows how wxWidgets was
configured. However, the windows version is not so fortunate... I find
it has a terrible distribution system. As I have said before,
wxWidgets should use CMake for their build system manager ;)
That said, what is being done is that if it is built we add it to
wxWidgets_LIBRARIES if not.. it will not fail to find wxWidgets. We
could provide some sort of wxWidgets_NO_LINK_COMMON_LIBS or
something... is this really necessary?
--Miguel
More information about the CMake
mailing list