From: Yaroslav Tsarko <[email protected]> Subject: Re: [Chicken-hackers] [PATCH] Fix #1133 Date: Thu, 03 Jul 2014 16:37:33 +0400
> Sure. First, please take a look at the following CMake wiki page: > http://www.cmake.org/Wiki/CMake_Cross_Compiling. > > In addition to that many CMake commands already know how to properly > work in cross-compilation mode (for example: find_library command > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:find_library). > > 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(CMAKE_SYSTEM_NAME Windows) > 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> ) Thanks for the information, this is very helpful. felix _______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
