SDK_ios.cmake 818 B

1234567891011121314151617181920212223242526
  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. # Detect the ios SDK Path and set the SYSROOT
  9. find_program(XCRUN_PROG "xcrun")
  10. execute_process(COMMAND ${XCRUN_PROG} --sdk iphoneos --show-sdk-path
  11. OUTPUT_VARIABLE LY_IOS_SDK_PATH
  12. RESULTS_VARIABLE GET_IOS_SDK_RESULT)
  13. if (NOT GET_IOS_SDK_RESULT EQUAL 0)
  14. message(FATAL_ERROR "Unable to determine the iOS SDK path")
  15. endif()
  16. string(STRIP ${LY_IOS_SDK_PATH} LY_IOS_SDK_PATH)
  17. set(CMAKE_SYSROOT ${LY_IOS_SDK_PATH})
  18. set(SDKROOT "iphoneos")
  19. set(DEVROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer")
  20. set(CMAKE_OSX_SYSROOT "${SDKROOT}")