view build.sh @ 60:6acb1dae6185

Use strn functions and improve error handling. Even if we know the strings are NULL terminated we use length terminated string functions after a first strlen this makes it easier to assert that at one point we know the string is terminated and afterwards use the length of that.
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 18 Mar 2014 11:28:02 +0000
parents 7b0efad494ea
children 1bf41957418f
line wrap: on
line source
#!/bin/bash

# This script is currently a dummy to take down some notes on building.
# It is not meant to be a general purpose build script.

set -e

cd `dirname $0`

# build requirements need to be installed:
#   polarssl, qt5, (opt) doxygen, (opt) hiawatha-webserver

mkdir -p build-linux
cd build-linux
cmake .. -DCMAKE_VERBOSE_MAKEFILE=True -DCMAKE_PREFIX_PATH=~/ubuntu
nice make -j8
cd ..
mkdir -p build-windows
cd build-windows
cmake .. -DCMAKE_PREFIX_PATH=~/wheezy/src/mxe/usr/i686-w64-mingw32/qt5 \
    -DCMAKE_TOOLCHAIN_FILE='~/wheezy/src/mxe/usr/i686-w64-mingw32/share/cmake/mxe-conf.cmake' \
    -DCMAKE_VERBOSE_MAKEFILE=True
nice make -j8
cd ..

# Note: qt5 plugins have .lib suffix
# find ~/wheezy/src/mxe/usr/i686-w64-mingw32/qt5/lib/cmake -name \*.cmake | xargs sed -i 's/\.lib/\.a//g'
# Also they need to have a lib prefixed...
# Then there is a bogous call _qt5gui_find_extra_libs(OPENGL "glu32;opengl32;gdi32;user32" "" "")
# where the second "" has to be replaced by your windows prefix. e.g. /home/andre/wheezy/src/mxe/usr/i686-w64-mingw32/lib

http://wald.intevation.org/projects/trustbridge/