Skip to content

Commit f848f3f

Browse files
committed
Added patch file correcting ios-cmake for cmake 3.0
1 parent 1ed7107 commit f848f3f

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

Build_iOS/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project(casablanca-ios)
1+
project(casablanca-ios NONE)
22
cmake_minimum_required(VERSION 2.6)
33

44
set(TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ios-cmake/toolchain/iOS.cmake")

Build_iOS/ios_cmake_clang3.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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

Comments
 (0)