|
| 1 | +# Copyright (c) 2015, Tomas Zemaitis |
| 2 | +# Copyright (c) 2016, David Hirvonen |
| 3 | +# All rights reserved. |
| 4 | + |
| 5 | +if(DEFINED POLLY_IOS_NOCODESIGN_10_1_ARM64_DEP_9_0_DEVICE_LIBCXX_HID_SECTIONS_LTO_CMAKE_) |
| 6 | + return() |
| 7 | +else() |
| 8 | + set(POLLY_IOS_NOCODESIGN_10_1_ARM64_DEP_9_0_DEVICE_LIBCXX_HID_SECTIONS_LTO_CMAKE_ 1) |
| 9 | +endif() |
| 10 | + |
| 11 | +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_clear_environment_variables.cmake") |
| 12 | + |
| 13 | +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_init.cmake") |
| 14 | + |
| 15 | +set(IOS_SDK_VERSION 10.1) |
| 16 | +set(IOS_DEPLOYMENT_SDK_VERSION 9.0) |
| 17 | +set(POLLY_XCODE_COMPILER "clang") |
| 18 | + |
| 19 | +polly_init( |
| 20 | + "iOS ${IOS_SDK_VERSION} / Universal (arm64) / \ |
| 21 | +Deployment ${IOS_DEPLOYMENT_SDK_VERSION} / \ |
| 22 | +${POLLY_XCODE_COMPILER} / \ |
| 23 | +No code sign / \ |
| 24 | +c++11 support / hidden / data-sections / function-sections / LTO" |
| 25 | + "Xcode" |
| 26 | +) |
| 27 | + |
| 28 | +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake") |
| 29 | + |
| 30 | +include(polly_fatal_error) |
| 31 | + |
| 32 | +# Fix try_compile |
| 33 | +set(MACOSX_BUNDLE_GUI_IDENTIFIER com.example) |
| 34 | +set(CMAKE_MACOSX_BUNDLE YES) |
| 35 | + |
| 36 | +# Verify XCODE_XCCONFIG_FILE |
| 37 | +set( |
| 38 | + _polly_xcode_xcconfig_file_path |
| 39 | + "${CMAKE_CURRENT_LIST_DIR}/scripts/NoCodeSign.xcconfig" |
| 40 | +) |
| 41 | +if(NOT EXISTS "$ENV{XCODE_XCCONFIG_FILE}") |
| 42 | + polly_fatal_error( |
| 43 | + "Path specified by XCODE_XCCONFIG_FILE environment variable not found" |
| 44 | + "($ENV{XCODE_XCCONFIG_FILE})" |
| 45 | + "Use this command to set: " |
| 46 | + " export XCODE_XCCONFIG_FILE=${_polly_xcode_xcconfig_file_path}" |
| 47 | + ) |
| 48 | +else() |
| 49 | + string( |
| 50 | + COMPARE |
| 51 | + NOTEQUAL |
| 52 | + "$ENV{XCODE_XCCONFIG_FILE}" |
| 53 | + "${_polly_xcode_xcconfig_file_path}" |
| 54 | + _polly_wrong_xcconfig_path |
| 55 | + ) |
| 56 | + if(_polly_wrong_xcconfig_path) |
| 57 | + polly_fatal_error( |
| 58 | + "Unexpected XCODE_XCCONFIG_FILE value: " |
| 59 | + " $ENV{XCODE_XCCONFIG_FILE}" |
| 60 | + "expected: " |
| 61 | + " ${_polly_xcode_xcconfig_file_path}" |
| 62 | + ) |
| 63 | + endif() |
| 64 | +endif() |
| 65 | + |
| 66 | +set(IPHONEOS_ARCHS arm64) |
| 67 | +set(IPHONESIMULATOR_ARCHS "") |
| 68 | + |
| 69 | +include("${CMAKE_CURRENT_LIST_DIR}/compiler/xcode.cmake") |
| 70 | +include("${CMAKE_CURRENT_LIST_DIR}/os/iphone.cmake") |
| 71 | +include("${CMAKE_CURRENT_LIST_DIR}/library/std/libcxx.cmake") |
| 72 | +include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake") |
| 73 | +include("${CMAKE_CURRENT_LIST_DIR}/flags/hidden.cmake") |
| 74 | +include("${CMAKE_CURRENT_LIST_DIR}/flags/function-sections.cmake") |
| 75 | +include("${CMAKE_CURRENT_LIST_DIR}/flags/data-sections.cmake") |
| 76 | +include("${CMAKE_CURRENT_LIST_DIR}/flags/lto.cmake") |
0 commit comments