biicode / boost

Experimental support for the Boost libraries on biicode
MIT License
15 stars 7 forks source link

Add complete support for cross compiling from linux for windows #17

Open R1tschY opened 9 years ago

R1tschY commented 9 years ago

Complete #15

Tested (examples/boost-filesystem, examples/boost-flyweight, examples/boost-multiindex, examples/boost-phoenix, examples/boost-signals) on Ubuntu 14.04.2 with

bii configure \
  -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-cross-mingw.cmake \
  -DCOMPILER_PREFIX=i686-w64-mingw32
bii build

~/Toolchain-cross-mingw.cmake:

set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
set(CMAKE_FIND_ROOT_PATH  /usr/${COMPILER_PREFIX} )
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

Boost Context do not compile, because it needs a windows assembler: http://blog.biicode.com/dependency-management-boost-libraries/