.travis-deps.sh 924 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. set -e
  3. set -x
  4. #if OS is linux or is not set
  5. if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
  6. export CC=gcc-6
  7. export CXX=g++-6
  8. mkdir -p $HOME/.local
  9. if [ ! -e $HOME/.local/bin/cmake ]; then
  10. echo "CMake not found in the cache, get and extract it..."
  11. curl -L http://www.cmake.org/files/v3.2/cmake-3.2.0-Linux-i386.tar.gz \
  12. | tar -xz -C $HOME/.local --strip-components=1
  13. else
  14. echo "Using cached CMake"
  15. fi
  16. if [ ! -e $HOME/.local/lib/libSDL2.la ]; then
  17. echo "SDL2 not found in cache, get and build it..."
  18. wget http://libsdl.org/release/SDL2-2.0.4.tar.gz -O - | tar xz
  19. cd SDL2-2.0.4
  20. ./configure --prefix=$HOME/.local
  21. make -j4 && make install
  22. else
  23. echo "Using cached SDL2"
  24. fi
  25. elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
  26. brew update
  27. brew install cmake qt5 sdl2 dylibbundler
  28. fi