← Back to team overview

kicad-developers team mailing list archive

Re: FindwxWidgets.cmake


On 7 April 2011 13:25, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:
> On 4/6/2011 7:38 PM, Brian Sidebotham wrote:
>> On 5 April 2011 19:57, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
>>>>>> For MS Windows in particular (cross building from Linux or not, both), and
>>>>>> other platforms too, I still say there is tremendous value in us providing
>>>>>> cmake "external project" support to build wxWidgets and anything else that
>>>>>> needs to be built.  This is a separate subject.  But I've given it some
>>>>>> thought on how to best do it so we do not munge our current Kicad build
>>>>>> cmake stack, which would remain as is.  Basically it would entail putting an
>>>>>> *optional* CMakeList.txt wrapper around everything, platform dependent, and
>>>>>> treating Kicad itself as an external project from there along with all the
>>>>>> other external projects.
>>>>> I think this is a good idea.  When (if?) I get some time, I will play around
>>>>> with it but it's off my radar for right now.
>>>>> Wayne
>>>> I started looking into this, and came to the same conclusion - that it
>>>> would be best to have a kicad builder cmake project which would
>>>> download wxWidgets, configure + build, and then download the kicad
>>>> source, configure and build.
>>>> On windows this makes a lot of sense. However, when you scratch the
>>>> surface, you see the windows weaknesses. For example, there is no way
>>>> to unzip something via the command line on a standard windows install.
>>> There is the whole gnuwin32 collection of *.exe's.
>>>    http://gnuwin32.sourceforge.net/
>>> Some of these may need to be installed upfront manually or automatically.
>>> CMake does have some decompression technology in it, at least for tar.gz and
>>> maybe you have some choice on which source bundle you download in some
>>> cases, being careful to select one supported by CMake.   But I'll bet the
>>> Windows build of CMake is sub-setted in this support, aw crap.
>> I have been looking at this tonight. In fact the built-in tar
>> functions of cmake are okay for the purposes of having wxWidgets as an
>> external project.
>> I started by looking to see if cmake could automate the installation
>> of mingw. I'm not sure this is going to be possible. Cmake will not
>> seemingly process anything unless if finds a working compiler to begin
>> with. So although cmake is capable of downloading and running the
>> mingw installer on windows, it won't because there isn't already a
>> working compiler. A bit of a paradox really. CmakeForceCompiler.cmake
>> doesn't help here.
>> Although, that said, installing MinGW on windows is now extremely
>> simple, it can be done on the command line, like so:
>> mingw-get install gcc g++ gdb mingw32-make
>> It's a shame this isn't a built-in Windows command!!
>> So I think MinGW will have to stay as a pre-requisite to building
>> KiCad until that problem can be solved.
> MinGW is not a prerequisite.  Having a valid compiler is a prerequisite.  MSVC,
> Borland, etc are all valid generator targets for CMake.  Using CMake to
> download and build wxWidgets will be more beneficial to these users than MinGW
> users.  My guess is most MinGW users are likely to install MSYS which means you
> can build wxWidgets using autotools since this is the process described in the
> Kicad build documentation for windows.
> Wayne

Hi Wayne,

Sorry that sentence is not right. The cmake file I am working on is
not something to replace the KiCad build system, and therefore MinGW
will not be a pre-requisite for building KiCad.

This script is (currently) designed for windows users to generate an
environment in a vanilla windows shell where-upon KiCad can then be
built. In this case, the only compiler that can be automatically
downloaded and installed is MinGW.

MSYS is the currently documented build environment for Windows, but it
doesn't have to be used. KiCad can be built through the standard
windows shell using cmake -G "MinGW Makefiles".

All this is really just an experiment I think. It is not set to change
anything in the current KiCad project build system because KiCad is an
external project added using cmake's external_add function

Best Regards,