Update qt build script to set nvidia or native configs from commandline

This commit is contained in:
Simon Detheridge 2015-01-26 18:13:53 +00:00
parent 52f6415085
commit c1031bbfee

View File

@ -1,14 +1,35 @@
#!/bin/bash #!/bin/bash
REBUILD=''
NVIDIA=''
NATIVE=''
while test $# -gt 0
do
case "$1" in
--rebuild) REBUILD='1'
;;
--nvidia) NVIDIA="CONFIG += nvidia"
;;
--native) NATIVE="CONFIG += native"
;;
--*) echo "bad option $1"; exit 1
;;
*) echo "unrecognised argument $1"; exit 1
;;
esac
shift
done
DIR=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd ) DIR=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
for PROJ in ${DIR}/{Ember,EmberCL,EmberGenome,EmberRender,EmberAnimate,Fractorium} for PROJ in ${DIR}/{Ember,EmberCL,EmberGenome,EmberRender,EmberAnimate,Fractorium}
do do
pushd $PROJ pushd $PROJ
if [ "x--rebuild" = "x$1" ]; then if [ "x1" = "x$REBUILD" ]; then
make clean make clean
fi fi
qmake qmake "$NVIDIA" "$NATIVE"
make -j9 make -j9
if [ "x$?" != "x0" ]; then if [ "x$?" != "x0" ]; then
echo "Build failed! Check output for errors." echo "Build failed! Check output for errors."