diff options
author | Jonathan Bauer | 2011-06-21 16:02:15 +0200 |
---|---|---|
committer | Jonathan Bauer | 2011-06-21 16:02:15 +0200 |
commit | a16c2f6e25459951798d47df079ddaa7be41400a (patch) | |
tree | f7d2c114cd552b3b60014f109c69488b1c817f2e /build.sh | |
parent | more cleanups (diff) | |
download | fbgui-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.sh | 33 |
1 files changed, 31 insertions, 2 deletions
@@ -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 |