PAL_ios.cmake 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. ly_set(PAL_EXECUTABLE_APPLICATION_FLAG MACOSX_BUNDLE)
  9. ly_set(PAL_LINKOPTION_MODULE SHARED) # For iOS, 'MODULE' creates a tool/bundle, but we treat it as a shared library
  10. ly_set(PAL_TRAIT_BUILD_HOST_GUI_TOOLS FALSE)
  11. ly_set(PAL_TRAIT_BUILD_HOST_TOOLS FALSE)
  12. ly_set(PAL_TRAIT_BUILD_SERVER_SUPPORTED FALSE)
  13. ly_set(PAL_TRAIT_BUILD_UNIFIED_SUPPORTED FALSE)
  14. ly_set(PAL_TRAIT_BUILD_UNITY_SUPPORTED TRUE)
  15. ly_set(PAL_TRAIT_BUILD_UNITY_EXCLUDE_EXTENSIONS ".mm")
  16. ly_set(PAL_TRAIT_BUILD_EXCLUDE_ALL_TEST_RUNS_FROM_IDE TRUE)
  17. ly_set(PAL_TRAIT_BUILD_CPACK_SUPPORTED FALSE)
  18. ly_set(PAL_TRAIT_PROF_PIX_SUPPORTED FALSE)
  19. # Determine if tests are supported based on the PAL_TRAIT_BUILD_TESTS_SUPPORTED_DEFAULT global property
  20. get_property(is_test_supported_default_set GLOBAL PROPERTY PAL_TRAIT_BUILD_TESTS_SUPPORTED_DEFAULT SET)
  21. if (is_test_supported_default_set)
  22. get_property(test_supported_default GLOBAL PROPERTY PAL_TRAIT_BUILD_TESTS_SUPPORTED_DEFAULT)
  23. ly_set(PAL_TRAIT_BUILD_TESTS_SUPPORTED ${test_supported_default})
  24. else()
  25. ly_set(PAL_TRAIT_BUILD_TESTS_SUPPORTED TRUE)
  26. endif()
  27. # Test library support
  28. ly_set(PAL_TRAIT_TEST_GOOGLE_TEST_SUPPORTED FALSE)
  29. ly_set(PAL_TRAIT_TEST_GOOGLE_BENCHMARK_SUPPORTED FALSE)
  30. ly_set(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED FALSE)
  31. ly_set(PAL_TRAIT_TEST_PYTEST_SUPPORTED FALSE)
  32. ly_set(PAL_TRAIT_TEST_TARGET_TYPE MODULE)
  33. if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
  34. ly_set(PAL_TRAIT_COMPILER_ID Clang)
  35. ly_set(PAL_TRAIT_COMPILER_ID_LOWERCASE clang)
  36. else()
  37. message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported in ${PAL_PLATFORM_NAME}")
  38. endif()
  39. # Set the default asset type for deployment
  40. set(LY_ASSET_DEPLOY_ASSET_TYPE "ios" CACHE STRING "Set the asset type for deployment.")
  41. # Set the python cmd tool
  42. ly_set(LY_PYTHON_CMD ${CMAKE_CURRENT_SOURCE_DIR}/python/python.sh)