You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

iosxc.toolchain.cmake 1.2 kB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Standard settings
  2. # set(UNIX True)
  3. # set(Darwin True)
  4. # set(IOS True)
  5. set (CMAKE_SYSTEM_NAME Darwin)
  6. set (CMAKE_SYSTEM_VERSION 1)
  7. set (UNIX True)
  8. set (APPLE True)
  9. set (IOS True)
  10. # suppress -rdynamic
  11. # set(CMAKE_SYSTEM_NAME Generic)
  12. set(CMAKE_C_COMPILER arm-apple-darwin11-clang)
  13. set(CMAKE_CXX_COMPILER arm-apple-darwin11-clang++)
  14. set(_CMAKE_TOOLCHAIN_PREFIX arm-apple-darwin11-)
  15. set(CMAKE_IOS_SDK_ROOT "/home/nihui/osd/cctools-port/usage_examples/ios_toolchain/target/SDK/iPhoneOS10.2.sdk")
  16. # Set the sysroot default to the most recent SDK
  17. set(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support")
  18. # set the architecture for iOS
  19. # set(IOS_ARCH arm64)
  20. set(IOS_ARCH armv7;arm64)
  21. set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS")
  22. # Set the find root to the iOS developer roots and to user defined paths
  23. set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root")
  24. # searching for frameworks only
  25. set(CMAKE_FIND_FRAMEWORK FIRST)
  26. # set up the default search directories for frameworks
  27. set(CMAKE_SYSTEM_FRAMEWORK_PATH
  28. ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
  29. )