kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #06291
Re: Crosscompilling again - no luck
On 03/14/2011 10:38 AM, Dick Hollenbeck wrote:
> On 03/10/2011 01:53 PM, Milan Horák wrote:
>> 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
>
> Last week I needed to build a MinGW application, and it needed to link to
> zlib (i.e. zip library). I was able to trick out the CMakeList.txt file for
> the parent program to download and build the zlib using the "external
> project" mechanism within CMake. Moreover, I did this from Linux for a
> Windows executable.
if( MINGW )
include(ExternalProject)
ExternalProject_Add( zlib
URL http://zlib.net/zlib-1.2.5.tar.gz
# DOWNLOAD_COMMAND wget http://www.zlib.net/zlib-1.2.5.tar.bz2
TIMEOUT 30
PATCH_COMMAND patch -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/zlib.patch
CONFIGURE_COMMAND
${CMAKE_COMMAND} -DBUILD_SHARED_LIBS=OFF
-DCMAKE_TOOLCHAIN_FILE=/svn/softplc/toolchain-mingw32.cmake
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/zlib-build
<SOURCE_DIR>
BUILD_IN_SOURCE 1
BUILD_COMMAND make
)
set( ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/zlib-build/include )
set( ZLIB_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/zlib-build/lib/libzlib.a )
else()
set( ZLIB_INCLUDE_DIR "" )
set( ZLIB_LIBRARIES z )
endif()
The URL command did not work with bz2 archives, but you could use tar.gz
using URL, or switch to the DOWNLOAD_COMMAND to implement wget instead.
References