fix building on RasPi

This commit is contained in:
Enno Rehling 2015-07-12 03:08:29 +02:00
parent ae079b8a15
commit cfb1812f24
4 changed files with 21 additions and 25 deletions

2
cmake

@ -1 +1 @@
Subproject commit 80fd16533e8c4b76e1164e5ebf543d832cf3a9f2
Subproject commit f1fb3943ace59994d90d71a891b80033dc2700a2

View File

@ -25,6 +25,8 @@ if [ ! -d $ROOT/$BUILD ]; then
exit
fi
git submodule update
if [ -z `which tolua` ]; then
echo "build tolua"
cd $ROOT/tolua ; make

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -e
ROOT=$(pwd)
while [ ! -d $ROOT/.git ]; do
ROOT=$(dirname $ROOT)
@ -34,32 +33,26 @@ if [ -d $HOME/usr ]; then
PREFIX_PATH=$HOME/usr:$HOME/usr/local:$PREFIX_PATH
fi
path=`which tolua`
echo "TOLUA $path"
if [ "$HAVE_TOLUA" = "0" ] || [ ! -e $path ]; then
echo "tolua is not installed, building from source"
cd $ROOT/tolua ; make
ARGS="$ARGS -DPC_TOLUA_DIR=$ROOT/tolua"
fi
path=`which lua`
if [ -e $path ]; then
path=`dirname $path` # /opt/bin
path=`dirname $path` # /opt
if [ -e $path/include/lua.h ] && [ -d $path/lib ] ; then
echo "lua is installed in $path"
ARGS="$ARGS -DPC_LUA_DIR=$LUA"
fi
fi
cd $BIN_DIR
cmake .. \
$ARGS \
-DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \
ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \
-DCMAKE_BUILD_TYPE=$BUILD \
-DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \
-DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \
-DCMAKE_PREFIX_PATH=$PREFIX_PATH \
-DCMAKE_INSTALL_PREFIX=$HOME/eressea/server $*
-DCMAKE_INSTALL_PREFIX=$HOME/eressea/server"
path="$(which tolua)"
if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then
echo "tolua is not installed, building from source"
cd $ROOT/tolua ; make
ARGS="$ARGS -DPC_TOLUA_DIR=$ROOT/tolua"
else
echo "tolua is $path"
fi
unset path
set -e
cd $BIN_DIR
cmake .. $ARGS $*
cd $OLDPWD

View File

@ -9,6 +9,7 @@ include_directories (${CRYPTO_INCLUDE_DIR})
include_directories (${QUICKLIST_INCLUDE_DIR})
include_directories (${CUTEST_INCLUDE_DIR})
include_directories (${LUA_INCLUDE_DIR})
include_directories (${TOLUA_INCLUDE_DIR})
include_directories (${BSON_INCLUDE_DIR})
include_directories (${INIPARSER_INCLUDE_DIR})