Configurations_mac.cmake 960 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 "AppleClang")
  9. include(cmake/Platform/Common/Clang/Configurations_clang.cmake)
  10. ly_append_configurations_options(
  11. DEFINES
  12. APPLE
  13. MAC
  14. __APPLE__
  15. DARWIN
  16. LINK_NON_STATIC
  17. -headerpad_max_install_names
  18. -lpthread
  19. -lncurses
  20. )
  21. ly_set(CMAKE_CXX_EXTENSIONS OFF)
  22. else()
  23. message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported in ${PAL_PLATFORM_NAME}")
  24. endif()
  25. # Signing
  26. ly_set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep")
  27. # Generate scheme files for Xcode
  28. ly_set(CMAKE_XCODE_GENERATE_SCHEME TRUE)
  29. # Make modules have the dylib extension
  30. ly_set(CMAKE_SHARED_MODULE_SUFFIX .dylib)