3
0

Configurations_linux_aarch64.cmake 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  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. #
  7. #
  8. if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
  9. include(cmake/Platform/Common/Clang/Configurations_clang.cmake)
  10. ly_append_configurations_options(
  11. DEFINES
  12. LINUX
  13. __linux__
  14. LINUX64
  15. COMPILATION
  16. -ffp-contract=off
  17. LINK_NON_STATIC
  18. -Wl,--no-undefined
  19. -fpie
  20. -Wl,-z,relro,-z,now
  21. -Wl,-z,noexecstack
  22. LINK_EXE
  23. -fpie
  24. -Wl,-z,relro,-z,now
  25. -Wl,-z,noexecstack
  26. )
  27. ly_set(CMAKE_CXX_EXTENSIONS OFF)
  28. elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
  29. include(cmake/Platform/Common/GCC/Configurations_gcc.cmake)
  30. if(LY_GCC_BUILD_FOR_GCOV)
  31. set(LY_GCC_GCOV_LFLAGS "-lgcov")
  32. endif()
  33. if(LY_GCC_BUILD_FOR_GPROF)
  34. set(LY_GCC_GPROF_LFLAGS "-pg")
  35. endif()
  36. ly_append_configurations_options(
  37. DEFINES
  38. LINUX
  39. __linux__
  40. LINUX64
  41. COMPILATION
  42. -ffp-contract=off
  43. LINK_NON_STATIC
  44. ${LY_GCC_GCOV_LFLAGS}
  45. ${LY_GCC_GPROF_LFLAGS}
  46. -Wl,--no-undefined
  47. -lpthread
  48. )
  49. ly_set(CMAKE_CXX_EXTENSIONS OFF)
  50. else()
  51. message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported in ${PAL_PLATFORM_NAME}")
  52. endif()
  53. ly_set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
  54. ly_set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
  55. ly_set(CMAKE_INSTALL_RPATH "$ORIGIN")