prepare_solution_darwin.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash
  2. #
  3. # Copyright (c) Contributors to the Open 3D Engine Project.
  4. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. #
  6. # SPDX-License-Identifier: Apache-2.0 OR MIT
  7. #
  8. # Build
  9. mkdir build
  10. mkdir build/release
  11. mkdir build/debug
  12. CMAKE='cmake'
  13. if ! command -v $CMAKE &> /dev/null
  14. then
  15. OLDCMAKE=$CMAKE
  16. CMAKE='-/Applications/CMake.app/Contents/bin/cmake'
  17. echo "$OLDCMAKE not found in PATH. Defaulting to: $CMAKE"
  18. fi
  19. $CMAKE -DMAKE_BUILD_TYPE=Release -S "src/" -B "build/release"
  20. pushd build/release
  21. echo "Building release..."
  22. make -j16
  23. ls
  24. echo "Release version:"
  25. ./azslc --version
  26. popd
  27. $CMAKE -DMAKE_BUILD_TYPE=Debug -S "src/external/antlr4/runtime/Cpp/" -B "build/debug/external/antlr4/runtime/Cpp/"
  28. pushd build/debug/external/antlr4/runtime/Cpp
  29. make -j16
  30. popd
  31. $CMAKE -DMAKE_BUILD_TYPE=Debug -S "src/" -B "build/debug"
  32. pushd build/debug
  33. echo "Building debug..."
  34. make -j16
  35. ls
  36. echo "Debug version:"
  37. ./azslc --version
  38. popd
  39. # Deploy
  40. mkdir bin
  41. mkdir bin/darwin
  42. mkdir bin/darwin/release
  43. mkdir bin/darwin/debug
  44. cp build/release/azslc bin/darwin/release/azslc
  45. cp build/debug/azslc bin/darwin/debug/azslc