|
| 1 | +diff -r -u ios-cmake/toolchain/iOS.cmake ios-cmake.patched/toolchain/iOS.cmake |
| 2 | +--- ios-cmake/toolchain/iOS.cmake 2014-07-02 02:56:17.000000000 -0700 |
| 3 | ++++ ios-cmake.patched/toolchain/iOS.cmake 2014-07-02 02:43:23.000000000 -0700 |
| 4 | +@@ -46,15 +46,6 @@ |
| 5 | + string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") |
| 6 | + endif (CMAKE_UNAME) |
| 7 | + |
| 8 | +-# Force the compilers to gcc for iOS |
| 9 | +-include (CMakeForceCompiler) |
| 10 | +-CMAKE_FORCE_C_COMPILER (gcc gcc) |
| 11 | +-CMAKE_FORCE_CXX_COMPILER (g++ g++) |
| 12 | +- |
| 13 | +-# Skip the platform compiler checks for cross compiling |
| 14 | +-set (CMAKE_CXX_COMPILER_WORKS TRUE) |
| 15 | +-set (CMAKE_C_COMPILER_WORKS TRUE) |
| 16 | +- |
| 17 | + # All iOS/Darwin specific settings - some may be redundant |
| 18 | + set (CMAKE_SHARED_LIBRARY_PREFIX "lib") |
| 19 | + set (CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") |
| 20 | +@@ -124,6 +115,14 @@ |
| 21 | + endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) |
| 22 | + set (CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform") |
| 23 | + |
| 24 | ++# Force the compilers to clang for iOS |
| 25 | ++set(CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang") |
| 26 | ++set(CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++") |
| 27 | ++ |
| 28 | ++# Skip the platform compiler checks for cross compiling |
| 29 | ++set (CMAKE_CXX_COMPILER_WORKS TRUE) |
| 30 | ++set (CMAKE_C_COMPILER_WORKS TRUE) |
| 31 | ++ |
| 32 | + # Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT |
| 33 | + if (NOT DEFINED CMAKE_IOS_SDK_ROOT) |
| 34 | + file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*") |
0 commit comments