docker_build_astcencoder_linux.sh 926 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. CPU_ARCHITECTURE=$(lscpu | grep Architecture | awk '{print $2}')
  7. if [ "$CPU_ARCHITECTURE" = "x86_64" ]
  8. then
  9. # On x86/x64 platforms, O3DE requires requirest SSE 4.1
  10. cmake -S src -B build -G "Unix Makefiles" \
  11. -DCMAKE_BUILD_TYPE=Release \
  12. -DISA_SSE41=ON
  13. elif [ "$CPU_ARCHITECTURE" = "aarch64" ]
  14. then
  15. # On aarch64 architectures, O3DE requires NEON simd support
  16. cmake -S src -B build -G "Unix Makefiles" \
  17. -DCMAKE_BUILD_TYPE=Release \
  18. -DISA_NEON=ON
  19. fi
  20. if [ $? -ne 0 ]
  21. then
  22. echo "Failed to generate build for astc encoder for Linux"
  23. exit 1
  24. fi
  25. cmake --build build
  26. if [ $? -ne 0 ]
  27. then
  28. echo "Failed to build astc encoder for Linux"
  29. exit 1
  30. fi