← Back to team overview

kicad-developers team mailing list archive

Re: Crosscompilling again - no luck


On 05/01/2011 04:48 PM, Milan Horák wrote:
> On the way to solution - cmake script ignores toolchain directive. Did 
> anything changed lately?
> Milan
> Dne 10.3.2011 20:53, Milan Horák napsal(a):
>> Hi gentlemen,
>> I'm trying again to crosscompile Kicad for Windows on Linux.
>> My problem is, that cmake ends with "wxWidgets bot found" message.
>> I ran cmake through strace but everything seems to be the right way.
>> wx is 2.8.11, Kubuntu 10.10
>> What should I focus on now?
>> Thanks for any advice.
>> Milan


1) Toolchain directive.
2) Finding wxWidgets during a cross compile.


1) The toolchain directive is given on the CMake command line to the *initial*
invocation of CMake, at a time when you have no CMakeCache.txt file.  The
toolchain file's information is then pre-loaded into the CMakeCache.txt file,
and this happens only once, and only if the CMakeCache.txt file does not exist
at time of initial CMake invocation.

2) Even if Windows version of wxWidgets cannot be found on linux during initial
CMake run, you can tell CMake later where the windows library is.  This is
typically done with ccmake, as follows:

$ cd <to dir where CMakeCache.txt is>

$ ccmake .

The dot means current directory.

If you can believe what is in our CMakeModules/FindwxWidgets.cmake file, then
when in ccmake's UI, it looks like you should be looking for variables like


and manually editing them to point to your windows wxWidgets lib.

Brian's script should soon clear all this up and make it easier.  Somebody
please feel to correct any errors you spot from me.