1# Cross compilation 2 3## Prerequisites 4 5```sh 6 sudo apt-get install bison flex libtool ruby scons intltool libtool-bin p7zip-full wine wine32 7``` 8 9## Build 10 11 12### Prepare MXE 13 14```sh 15git submodule update --init 16``` 17 18`nano ./mxe/settings.mk`: 19 20``` 21JOBS := 1 22MXE_TARGETS := x86_64-w64-mingw32.static 23LOCAL_PKG_LIST := cunit libiberty 24.DEFAULT local-pkg-list: 25local-pkg-list: $(LOCAL_PKG_LIST) 26``` 27 28``` 29cd ./mxe 30make 31``` 32 33### Cross compilation 34 35``` 36mkdir ./build 37cd ./build 38 39export MXE_HOME=<path to project>/mxe 40 41cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../win64-tc.cmake \ 42 -DBUILD_TESTS=ON -DTEST_TOOL_CMD=wine 43 44make package 45``` 46