From 041c0fdfaa986dd89c6c75c2e1f2239de77cc551 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 11 Jan 2018 17:13:49 +0100 Subject: [PATCH] export LUA_DIR to find the right LUA_INCLUDE_DIR --- s/cmake-init | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/s/cmake-init b/s/cmake-init index 9d529a433..3d4e073a7 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -38,15 +38,21 @@ ARGS=" -DCMAKE_BUILD_TYPE=$BUILD \ 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)" if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then echo "tolua is not installed, building from source" cd $ROOT 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..." git clone https://github.com/ennorehling/tolua-${LUA_VERSION}.git tolua fi