forked from github/server
detect missing lua library
This commit is contained in:
parent
54ee7c04dc
commit
b0840f83ef
1 changed files with 9 additions and 1 deletions
10
s/cmake-init
10
s/cmake-init
|
@ -47,12 +47,20 @@ DEST=$(dirname $ROOT)/server
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
|
||||||
LUA_VERSION="5.2"
|
LUA_VERSION="5.2"
|
||||||
|
LUA_INCLUDE=/usr/include
|
||||||
LUA_DIR=/usr
|
LUA_DIR=/usr
|
||||||
if [ -d /usr/include/lua5.1 ]; then
|
if [ -d /usr/include/lua5.1 ]; then
|
||||||
LUA_VERSION="5.1"
|
LUA_VERSION="5.1"
|
||||||
|
LUA_INCLUDE=/usr/include/lua5.1
|
||||||
elif [ -d /usr/local/include/lua5.1 ]; then
|
elif [ -d /usr/local/include/lua5.1 ]; then
|
||||||
export LUA_DIR=/usr/local
|
export LUA_DIR=/usr/local
|
||||||
LUA_VERSION="5.1"
|
LUA_VERSION="5.1"
|
||||||
|
LUA_INCLUDE=/usr/local/include/lua5.1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e ${LUA_INCLUDE}/lua.h ]; then
|
||||||
|
echo "no compatible version of lua is installed."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >| $BUILD/config.cmake <<HEREDOC
|
cat >| $BUILD/config.cmake <<HEREDOC
|
||||||
|
@ -68,7 +76,7 @@ path="$(which tolua)"
|
||||||
if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then
|
if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then
|
||||||
echo "tolua is not installed, building from source"
|
echo "tolua is not installed, building from source"
|
||||||
cd $ROOT
|
cd $ROOT
|
||||||
if [ ! -d tolua ]; then
|
if [ ! -d tolua/include ]; then
|
||||||
echo "fetching tolua ${LUA_VERSION} from github..."
|
echo "fetching tolua ${LUA_VERSION} from github..."
|
||||||
git clone https://github.com/ennorehling/tolua-${LUA_VERSION}.git tolua
|
git clone https://github.com/ennorehling/tolua-${LUA_VERSION}.git tolua
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue