summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorJonathan Bauer2011-06-21 16:02:15 +0200
committerJonathan Bauer2011-06-21 16:02:15 +0200
commita16c2f6e25459951798d47df079ddaa7be41400a (patch)
treef7d2c114cd552b3b60014f109c69488b1c817f2e /build.sh
parentmore cleanups (diff)
downloadfbgui-a16c2f6e25459951798d47df079ddaa7be41400a.tar.gz
fbgui-a16c2f6e25459951798d47df079ddaa7be41400a.tar.xz
fbgui-a16c2f6e25459951798d47df079ddaa7be41400a.zip
using cmake instead of qmake
Diffstat (limited to 'build.sh')
-rwxr-xr-x[-rw-r--r--]build.sh33
1 files changed, 31 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 4ed283b..cda70f2 100644..100755
--- a/build.sh
+++ b/build.sh
@@ -1,2 +1,31 @@
-#!/bin/bash
-# TODO auto-compiler with cmake
+#!/bin/sh
+# fbsplash builder script for cmake
+DIR=$(pwd)
+BUILDDIR=build
+
+# if --clean, remove build dir
+if [ "$1" = "--clean" ]
+then
+ rm -rf $BUILDDIR
+ echo "$BUILDDIR removed."
+ exit 1
+fi
+
+if [ ! -f CMakeLists.txt ]
+then
+ echo "No CMakeLists.txt found."
+ echo "Run this script from the folder containing CMakeLists.txt."
+ exit 1
+fi
+
+# make build dir if its not there
+[ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
+
+cd $BUILDDIR
+# use cmake to create Makefile
+echo "Invoking cmake ..."
+cmake "$DIR"
+echo "Invoking make ..."
+make
+
+cd $DIR