forked from github/server
export LUA_DIR to find the right LUA_INCLUDE_DIR
This commit is contained in:
parent
014cc02c45
commit
041c0fdfaa
14
s/cmake-init
14
s/cmake-init
|
@ -38,15 +38,21 @@ ARGS=" -DCMAKE_BUILD_TYPE=$BUILD \
|
||||||
|
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
|
||||||
|
LUA_VERSION="5.2"
|
||||||
|
LUA_DIR=/usr
|
||||||
|
if [ -d /usr/include/lua5.1 ]; then
|
||||||
|
LUA_VERSION="5.1"
|
||||||
|
elif [ -d /usr/local/include/lua5.1 ]; then
|
||||||
|
LUA_DIR=/usr/local
|
||||||
|
LUA_VERSION="5.1"
|
||||||
|
fi
|
||||||
|
export LUA_DIR
|
||||||
|
|
||||||
path="$(which tolua)"
|
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 ]; then
|
||||||
LUA_VERSION="5.2"
|
|
||||||
if [ -d /usr/include/lua5.1 ] || [ -d /usr/local/include/lua5.1 ]; then
|
|
||||||
LUA_VERSION="5.1"
|
|
||||||
fi
|
|
||||||
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 New Issue