kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #02761
Re: Compiling for Windows under Linux
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
Milan Horák <konference@...>
-
Date:
Thu, 18 Jun 2009 15:42:36 +0200
-
In-reply-to:
<4A38FBAE.3010606@...>
-
Reply-to:
konference@...
-
User-agent:
Thunderbird 2.0.0.21 (X11/20090409)
Hi, just info, Kicad compiled on Linux works on Windows. Check.
Milan Horák napsal(a):
> 4) Had to change windres.exe to i586-mingw32msvc-windres in
> MinGWResourceCompiler.cmake according to Mateusz. I would like to
> find a way to isolate this change to your toolkit file. Can a proper
> variable be injected in your toolkit file so that the standard winres
> variable name can be used in MinGWResourceCompiler.cmake?
I think we can manage it by some host based check in cmake file. Will
check it.
Solved by adding
set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
to toolchain file. Check.
>
> 5) We need a copy of your toolkit file committed into the tree, although
> developers should know that this one is considered very "host machine
> dependent" and will need to be edited before use.
Will do. Will make it easily configurable.
==BEGIN==
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
set(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
set(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH
/usr/i586-mingw32msvc
# change it according to your paths
/home/milan/Development/mingw)
# adjust the default bahaviour of the FIND_XXX() commands:
# search programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# search headers and libraries in the target environment
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
==END==
Check.
Needed to use mingwm10.dll from official package - file not present on Linux.
Libraries needed for Kicad to work:
mingwm10.dll
wxbase28u_gcc_custom.dll
wxbase28u_net_gcc_custom.dll
wxmsw28u_adv_gcc_custom.dll
wxmsw28u_core_gcc_custom.dll
wxmsw28u_gl_gcc_custom.dll
wxmsw28u_html_gcc_custom.dll
Added package to kicad.1301.cz. Check.
Milan
>
> Last is a question:
>
> Were you able to build wxWidgets for Windows on Linux?
Yes, wxWidgets I'm talking about are compiled on Linux for Windows }By
Mateusz's guide).
Milan
Follow ups
References