create-build-envs.sh 506 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. export PATH="$PATH:/Applications/CMake.app/Contents/bin/"
  3. cd $(dirname $0)/../..
  4. ROOT=$(pwd)
  5. mkdir "build"
  6. cd build
  7. BUILD=$(pwd)
  8. build-env()
  9. {
  10. cd $BUILD
  11. mkdir "$1"
  12. cd "$1"
  13. cmake "$ROOT" -G "$2"
  14. }
  15. if [[ $(uname) == MINGW* ]]
  16. then
  17. build-env "Make" "MinGW Makefiles"
  18. build-env "SublimeText" "Sublime Text 2 - Ninja"
  19. build-env "VisualStudio" "Visual Studio 14 2015"
  20. else
  21. build-env "SublimeText" "Sublime Text 2 - Ninja"
  22. build-env "Make" "Unix Makefiles"
  23. build-env "Xcode" "Xcode"
  24. fi