SDK_ios.cmake 819 B

1234567891011121314151617181920212223242526
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 OR MIT
  5. #
  6. #
  7. # Detect the ios SDK Path and set the SYSROOT
  8. find_program(XCRUN_PROG "xcrun")
  9. execute_process(COMMAND ${XCRUN_PROG} --sdk iphoneos --show-sdk-path
  10. OUTPUT_VARIABLE LY_IOS_SDK_PATH
  11. RESULTS_VARIABLE GET_IOS_SDK_RESULT)
  12. if (NOT GET_IOS_SDK_RESULT EQUAL 0)
  13. message(FATAL_ERROR "Unable to determine the iOS SDK path")
  14. endif()
  15. string(STRIP ${LY_IOS_SDK_PATH} LY_IOS_SDK_PATH)
  16. set(CMAKE_SYSROOT ${LY_IOS_SDK_PATH})
  17. set(SDKROOT "iphoneos")
  18. set(DEVROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer")
  19. set(CMAKE_OSX_SYSROOT "${SDKROOT}")