← Back to team overview

kicad-developers team mailing list archive

Re: Problems compiling for Windows under Linux

 

Hallo and thanks for the answer.

Changed it according to cmake 2.6.4 to work.

Next it looks for libraries in gcc_lib and gcc_dll directories which does not exist on my system.

Milan


Dick Hollenbeck napsal(a):



Milan Horák wrote:
> Hallo gentlemen,
>
> I'm trying to cross compile Kicad binaries for Windows under Linux (thanks
> Mateusz) and cannot make it work.
>
> The problem is with cmake, especially part where it looks for wxWidgets. It
> finds wx.h but then it looks for some /usr/i586.../msw/build.cfg file.
>
> I saw somewhere on the net, that build.cfg is not present on all platforms.
> Is it really necessary? How to proceed to next step?
>
> Milan
>

Milan,

I guess you have a CMake toolchain file for the cross build already in hand?

I would troubleshoot the lines

find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
check_find_package_result(wxWidgets_FOUND "wxWidgets")

in the topmost CMakeList.txt file.

The first line is a type of file include, which pulls in a file by the
name of:

/usr/share/cmake-2.6/Modules/FindwxWidgets.cmake

on my system. On your system, this may be a different file.
What is important is that this file is not part of Kicad that I can
see. The *.cmake files can come from either the <kicad>/CMakeModules
directory or from the cmake standard directory, which on my system is

/usr/share/cmake-2.6/Modules/

Here is what I recommend:

1) copy your FindwxWidgets.cmake file from its standard place to
<kicad>/CMakeModules where you can edit it without being root.

2) Pull it up in a text editor, and try and understand it with the CMake
documentation in hand.

3) add

message( variable=${variable} )

like statements liberally to "debug" the file at various points in the
execution sequence.

4) Always use an out of tree build, and remove your CMakeCache.txt file
between attempts.

5) If you find the problem, we can then commit your changes and include
them as part of <kicad>/CMakeModules/FindwxWidgets.cmake. However any
changes must also work with standard windows and standard linux.

6) If all else fails, you can run "ccmake . " in your out of tree build
directory and try and manually satisfy the things that
FindwxWidgets.cmake is looking for. Its goal is to set some variables
into the CMakeCache.txt file, but you can do that manually with "ccmake
. " in your build directory.

Dick









Follow ups

References