@@ -9,11 +9,11 @@ these libraries are Boost and OpenSSL.
9
9
This document will walk through the steps to build casablanca and its
10
10
dependencies into a form suitable for use with iOS applications.
11
11
12
- For this walkthrough, we assume you are working within the root directory of the
13
- casablanca project.
12
+ For this walkthrough, we assume you are working within the 'Build_iOS'
13
+ directory of the casablanca project.
14
14
15
15
$ git clone https://git01.codeplex.com/casablanca
16
- $ cd casablanca
16
+ $ pushd casablanca/Build_iOS
17
17
18
18
19
19
Building OpenSSL
@@ -22,16 +22,16 @@ Building OpenSSL
22
22
To build OpenSSL, use the script provided by the OpenSSL-for-iPhone project.
23
23
24
24
$ git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
25
- $ cd OpenSSL-for-iPhone
25
+ $ pushd OpenSSL-for-iPhone
26
26
$ ./build-libssl.sh
27
- $ cd ..
27
+ $ popd
28
28
29
29
After building the library, move the include files and libraries to
30
- ` casablanca /openssl- include` and ` casablanca /openssl-ios /lib` respectively.
30
+ ` Build iOS /openssl/ include` and ` Build iOS /openssl/lib` respectively.
31
31
32
- $ mv OpenSSL-for-iPhone/include openssl-include
33
- $ mkdir openssl-ios
34
- $ mv OpenSSL-for-iPhone/lib openssl-ios/lib
32
+ $ mkdir openssl
33
+ $ mv OpenSSL-for-iPhone/include openssl
34
+ $ mv OpenSSL-for-iPhone/lib openssl
35
35
36
36
This completes building OpenSSL.
37
37
@@ -47,7 +47,7 @@ there are a few actively maintained forks. We recommend using the fork by Joseph
47
47
Galbraith.
48
48
49
49
$ git clone https://git.gitorious.org/boostoniphone/galbraithjosephs-boostoniphone.git boostoniphone
50
- $ cd boostoniphone
50
+ $ pushd boostoniphone
51
51
52
52
The script ` boost.sh ` provided by the boostoniphone project has a variable at
53
53
the top of the file to specify which parts of boost need be compiled. This
@@ -59,14 +59,15 @@ signals, filesystem, regex, program_options, system.
59
59
60
60
The headers need to be moved to allow inclusion via ` "boost/foo.h" ` .
61
61
62
- $ cd ios/framework/boost.framework/Versions/A
62
+ $ pushd ios/framework/boost.framework/Versions/A
63
63
$ mkdir Headers2
64
64
$ mv Headers Headers2/boost
65
65
$ mv Headers2 Headers
66
+ $ popd
66
67
67
68
Finally, the product framework must be moved into place.
68
69
69
- $ cd ..
70
+ $ popd
70
71
$ mv boostoniphone/ios/framework/boost.framework .
71
72
72
73
This completes building Boost.
@@ -81,9 +82,7 @@ Preparing the Casablanca build
81
82
Casablanca uses CMake for cross-platform compatibility. To build on iOS, we
82
83
specifically use the toolchain file provided by the ios-cmake project.
83
84
84
- $ cd ios
85
- $ hg clone https://code.google.com/p/ios-cmake/
86
- $ cd ..
85
+ $ hg clone https://code.google.com/p/ios-cmake/
87
86
88
87
This completes the preparation for building Casablanca.
89
88
@@ -97,29 +96,32 @@ Building Casablanca
97
96
Now we are ready to build Casablanca for iOS. Invoke the ios-buildscripts
98
97
subproject in the usual CMake fashion:
99
98
100
- $ cd ios
101
99
$ mkdir build.ios
102
- $ cd build.ios
100
+ $ pushd build.ios
103
101
$ cmake .. -DCMAKE_BUILD_TYPE=Release
104
102
$ make
105
- $ cd ..
106
- $ cd ..
103
+ $ popd
107
104
108
- This will take a while and produce appropriately lipo'd static libraries.
105
+ This will take a while and produce universal static libraries inside
106
+ the 'build.ios' directory.
109
107
110
108
111
109
Using Casablanca
112
110
----------------
113
- You will need to add/reference the following from your project:
111
+ You will need to link against the following from your project:
114
112
115
- * ios/ build.ios/libcasablanca.a
113
+ * build.ios/libcasablanca.a
116
114
* boost.framework
117
- * openssl-include
118
- * openssl-ios/lib/libcrypto.a
119
- * openssl-ios/lib/libssl.a
120
- * Release/include
115
+ * openssl/lib/libcrypto.a
116
+ * openssl/lib/libssl.a
121
117
* libiconv.dylib
122
118
119
+ You will also need to add the following paths as additional include directories:
120
+
121
+ * ../Release/include
122
+ * boost.framework/Headers
123
+ * openssl/include
124
+
123
125
This should allow you to reference and use casablanca from your C++ and
124
126
Objective-C++ source files. Note: you should change all .m files in your project
125
127
to .mm files, because even if the source file itself does not use Casablanca, it
0 commit comments