From 796d95713f6ffa7ac11dc7cdff51169751e01650 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Sun, 23 Aug 2020 21:17:00 +0200 Subject: [PATCH] add cross compile with mxe --- cross_compile.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cross_compile.sh diff --git a/cross_compile.sh b/cross_compile.sh new file mode 100644 index 0000000..a18c7d7 --- /dev/null +++ b/cross_compile.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -xe + +# git clone https://github.com/mxe/mxe.git +# cd mxe && make qtbase +# make -j 4 qt qt5 MXE_TARGETS='x86_64-w64-mingw32.shared i686-w64-mingw32.shared x86_64-w64-mingw32.static i686-w64-mingw32.static' +# make qtbase + +# set correct path +MXE_ROOT=$1 +export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$MXE_ROOT/usr/bin + +# run make file generator +cmd=$MXE_ROOT/usr/bin/i686-w64-mingw32.static-qmake-qt5 +$cmd + +# clean and make +make clean +make