summaryrefslogtreecommitdiff
path: root/contrib/build-boost-mingw-cross.sh
blob: 5379a3d7ac0019bb69367714361f069ae8fd5ad8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
set -e
BOOST=1.50.0

BOOST_DASH=`echo $BOOST | perl -ne 's/\./_/g; print'`
echo $BOOST_DASH
wget http://downloads.sourceforge.net/project/boost/boost/$BOOST/boost_${BOOST_DASH}.tar.bz2 -O - | tar xj

cd boost_${BOOST_DASH}
./bootstrap.sh

patch -p1 < ../boost_project-config.patch

for target in w32 w64; do
  ./b2 --layout=system variant=release threading=multi link=shared runtime-link=shared toolset=gcc-$target target-os=windows threadapi=win32 stage || true
  mkdir -p ../boost-$target/include
  mv stage/lib ../boost-$target/
  cp -r boost ../boost-$target/include
  ./b2 --layout=system variant=release threading=multi link=shared runtime-link=shared toolset=gcc-$target target-os=windows threadapi=win32 stage --clean || true
done
rm -rf ../boost_${BOOST_DASH}