[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix #1133

From: Yaroslav Tsarko
Subject: Re: [Chicken-hackers] [PATCH] Fix #1133
Date: Thu, 03 Jul 2014 16:37:33 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Sure. First, please take a look at the following CMake wiki page:

In addition to that many CMake commands already know how to properly work in cross-compilation mode (for example: find_library command

In common scenario all you need to do is to set up a few CMake variables to specify your cross-compilation target and CMake will handle many things automatically.

As example (I used this to build CLucene library on my Ubuntu 12.04 system for Windows):

cmake -D CMAKE_TOOLCHAIN_FILE=mingw-w64-toolchain.cmake -D CMAKE_INSTALL_PREFIX=<path> ..

where mentioned mingw-w64-toolchain.cmake file contains:

SET(GNU_HOST i686-w64-mingw32)
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
SET(CMAKE_FIND_ROOT_PATH  <path-to-mingw32> )

On 03.07.2014 16:05, Felix Winkelmann wrote:
From: Yaroslav Tsarko <address@hidden>
Subject: Re: [Chicken-hackers] [PATCH] Fix #1133
Date: Thu, 03 Jul 2014 12:14:10 +0400

Besides weird and clumsy syntax CMake has one great advantage over
herds of others so-called "build systems" (waf, scons, gyp ... <put
your name here>) - cross compilation, and being a packager, you should
be aware of that. CMake has indeed decent support of it. And this
point gives CMake 100 points ahead of others "build systems".
Interesting. Can you point me to specifics? I find the cmake
documentation somewhat opaque, but perhaps it's just the terminology
that is alien to me. In other words, what makes cross-compilation
in CMake easier than in, say, GNU make?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]