Configurations_linux_aarch64.cmake 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. -Wl,--disable-new-dtags
  27. )
  28. ly_set(CMAKE_CXX_EXTENSIONS OFF)
  29. elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
  30. include(cmake/Platform/Common/GCC/Configurations_gcc.cmake)
  31. if(LY_GCC_BUILD_FOR_GCOV)
  32. set(LY_GCC_GCOV_LFLAGS "-lgcov")
  33. endif()
  34. if(LY_GCC_BUILD_FOR_GPROF)
  35. set(LY_GCC_GPROF_LFLAGS "-pg")
  36. endif()
  37. ly_append_configurations_options(
  38. DEFINES
  39. LINUX
  40. __linux__
  41. LINUX64
  42. COMPILATION
  43. -ffp-contract=off
  44. LINK_NON_STATIC
  45. ${LY_GCC_GCOV_LFLAGS}
  46. ${LY_GCC_GPROF_LFLAGS}
  47. -Wl,--no-undefined
  48. -lpthread
  49. -Wl,--disable-new-dtags
  50. )
  51. ly_set(CMAKE_CXX_EXTENSIONS OFF)
  52. else()
  53. message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported in ${PAL_PLATFORM_NAME}")
  54. endif()
  55. ly_set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
  56. ly_set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
  57. ly_set(CMAKE_INSTALL_RPATH "$ORIGIN")