[CMake] wxCmakeSetup

Juan Sanchez Juan.Sanchez at amd.com
Fri Oct 26 14:36:40 EDT 2007


With wxWidgets 2.6.8, the 64 bit issues appear to be solved.
Unfortunately, it no longer likes receiving (const char *)'s without
converting them using some special functions.  It would take a while to
change the code according to the instructions in:
http://www.wxwidgets.org/wiki/index.php/WxString

namely (const char []) would have to be placed in a _T().
wxString string(_T("Some text"));

and (const char *) would have have to have something like:

const char *ascii_str = "Some text";
wxString string(ascii_str, wxConvUTF8);

Not a trivial task.

Juan

Bill Hoffman wrote:
> Mike Jackson wrote:
>> I am more intersted in a nice Qt CMakeSetup but with some more added 
>> features. wxWidgets and Fltk just do not look that good under OS X. I am 
>> also hoping that if a nice Qt GUI were made Kitware might include it 
>> since ParaView uses Qt. It would make a nice standardization on Qt, 
>> which is a nice toolkit.
>>
>> I would write the Qt if I new what to actually implement. Not being able 
>> to compile the wx version leaves me with no real working code to look 
>> at.  I guess a little hand holding or "this is where to look" or "you 
>> need to implement these functions" would be a nice start.. hint hint..
>>
> 
> Sounds like 2.6.2 wxwidgets should work.
> 
> 
> There are code examples for cmake gui's in the cmake source tree. 
> ccmake, CMakeSetup, and wxCMakeSetup.   The MFC one is not a bad place 
> to start.   Most of the work is done in a cmake object.   The basic gui 
> does this:
> 
> 1. load registry stuff from previous runs
> 
> 2. configure
>     - ask for a generator to use if one is not yet set
>     - ask to create build directory if not there
>     - save the gui values to the cache file
>     - call cmake::Configure()
>     - save stuff to registry
> 
> 3. Generate
>      - only allowed to do this if configure has been run and there are 
> no new cache values or errors.
>      - call cmake::Generate()
>      - save stuff to the registry
> 
> The big part of the implementation is the save/load of the cache.  You 
> don't actually have to save the cache, you just have to set values in 
> the cache and call save on it.  You can find that code here:
> 
> // copy from the cache manager to the cache edit list box
> void CMakeSetupDialog::FillCacheGUIFromCacheManager()
> // copy from the list box to the cache manager
> void CMakeSetupDialog::FillCacheManagerFromCacheGUI()
> 
> CMakeSetupDialog::FillCacheGUIFromCacheManager
> 
> 
> -Bill
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 





More information about the CMake mailing list