[CMake] Somehow making life easier with wxWidgets ...

Jorgen Bodde jorgen.maillist at gmail.com
Tue Mar 11 10:57:00 EDT 2008


Hi Miquel / Bill / et al

>  You mean generated at configuration/build time from the bakefile
>  system? That seems like a good idea. They would have to generate
>  different files probably, since different configurations co-exist.
>
>  wxWidgets-unicode-release.cmake
>  wxWidgets-unicode-static.cmake
>
>  I could help in creating the structure for the wxWidgets.cmake and how
>  that would be used from the FindwxWidgets.cmake, etc. However, I don't
>  have the time to learn how the bakefile system works and where the
>  generation would be triggered... maybe Jorgen can help here :)

I think that would be a good start. The problem however by splitting
up cmake files like this again, is not knowing how wxWidgets is
actually built. The bakefile output might have generated projects for
all configurations, it won't tell you if the libraries are actually
there. And to make it real easy for the end user (hence my original
idea) is to discover the libraries dynamically on disk. If the
wxWidgets path is c:\wxWindows-2.8 (or any other place) we try to find
what build directory is actually populated with the library files and
somehow determine the version number, unicode yes no, debug or shared
/ monolithic etc.

I would even vote for a mini wizard (this can only work running the
CmakeSetup GUI though) with the following use-case:

- Start CMakeSetup
- Fill in your wxWidgets dir
- Press configure
- Multiple configs are found to be built (unicode, shared, debug)
- User gets choice between valid options (e.g. a drop down box with
unicode-debug, unicode-release, ansi-debug, ansi-release) and I would
even skip monolithic builds as they are outdated.
- User selects which config wx is built with (even when there are more then one)
- Configure
- Generate and done

More then this, e.g. setting the proper flags inside the Cmake file is
something I do not want my end users to do. Simply a wizard that
restricts the choices to a flat list, and only shows what is present,
so end-users won't get linking errors because the selected set of libs
is not yet compiled.

If we somehow can get the above to work, I am willing to put effort in
trying to get a bridge between the wx-core and cmake. But teh end
result must be transparent for the user somehow.

- Jorgen


More information about the CMake mailing list