summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/sol2/install.deps.sh
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-07 14:43:09 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-07 14:43:09 +0200
commit377472a6dd2c9bdff4d5667f5789c49aee2abb4c (patch)
treea0ce4d6fc3db1524609efc61307d48448e703f38 /3rdparty/sol2/install.deps.sh
parent1335933ce00cf6095e403a24d0b1dd9e0b565650 (diff)
Added sol2 header only library as future replacement for luabridge (nw)
Diffstat (limited to '3rdparty/sol2/install.deps.sh')
-rw-r--r--3rdparty/sol2/install.deps.sh96
1 files changed, 96 insertions, 0 deletions
diff --git a/3rdparty/sol2/install.deps.sh b/3rdparty/sol2/install.deps.sh
new file mode 100644
index 00000000000..b3571190663
--- /dev/null
+++ b/3rdparty/sol2/install.deps.sh
@@ -0,0 +1,96 @@
+#!/usr/bin/env bash
+
+# This script installs and configures the dependencies for the project
+
+case `uname` in
+ Darwin) export OS_NAME="osx" ;;
+ Linux) export OS_NAME="linux" ;;
+esac
+
+echo "Building on: ${OS_NAME}"
+
+if env | grep -qE '^(?:TRAVIS|CI)='; then
+# We're on Travis, intialize variables:
+ echo "Detected CI Build -> CI=${CI}"
+else
+# We're building locally
+ export CI=false
+ echo "Detected Local Build -> CI=${CI}"
+fi
+
+export_compiler_vars() {
+ case ${COMPILER} in
+ appleclang*)
+ export CC=clang
+ export CXX=clang++
+ ;;
+
+ clang*)
+ export CC=$(echo ${COMPILER} | sed 's/\+//g')
+ export CXX=${COMPILER}
+ ;;
+
+ g++-*)
+ export CC=$(echo ${COMPILER} | sed 's/\+/c/g')
+ export CXX=${COMPILER}
+ ;;
+
+ *) echo "Invalid compiler version" ; exit 2 ;;
+ esac
+
+ echo "CC=${CC}"
+ $CC --version
+
+ echo "CXX=${CXX}"
+ $CXX --version
+}
+
+install_os_deps() {
+ # Install all of the OS specific OS dependencies
+ echo "Install: os-based dependencies"
+
+ local wd=`pwd`
+
+ case ${OS_NAME} in
+ osx)
+ export HOMEBREW_NO_EMOJI=1
+
+ echo "brew update ..."; brew update > /dev/null
+
+ case ${COMPILER} in
+ appleclang*) ;;
+
+ g++-5)
+ brew install gcc5
+ brew link gcc5 --overwrite --force
+ ;;
+
+ g++-4.9) ;;
+
+ *) echo "Invalid compiler version" ; exit 2 ;;
+ esac
+
+ brew install ninja
+
+ local lua_pkg
+ case ${LUA_VERSION} in
+ lua53) lua_pkg=lua53 ;;
+ lua52) lua_pkg=lua ;;
+ lua51) lua_pkg=lua51 ;;
+ luajit52) lua_pkg=luajit ;;
+ luajit) lua_pkg=luajit ;;
+ *) echo "Invalid Lua Version for OSX"
+ exit 2
+ ;;
+ esac
+
+ brew install ${lua_pkg}
+ ;;
+
+ linux)
+ # no extras currently
+ ;;
+ esac
+
+ cd ${wd}
+}