## What?
A build script to compile [Boost](http://www.boost.org)
([1.51.0](http://www.boost.org/users/history/version_1_51_0.html) or so) for iOS.
## Why?
Because your iPhone doesn't get enough c++.
## How?
### The blue pill
Prerequisites:
- [Subversion](http://subversion.tigris.org)
Sync 'n build:
```sh
$ ./boost-jam.rb
```
(For more options, such as setting which SDK or libraries you want), see --help.
You should now have a framework in `./boost.framework`. Drag'n'drop to Xcode and get compiling!
### The red pill
Prerequisites:
- [Git](http://git-scm.com)
- [CMake](http://www.cmake.org)
- [Ninja](http://martine.github.com/ninja/)
Clone this repo:
```sh
$ git clone http://github.com/sagran/boost-ios.git
```
Clone other repos:
```sh
$ git submodule init
$ git submodule update
```
Now would be a good time to check `./boost-zero` and see if you want to check out a different version.
Configure the script. You want to make sure the boost version matches the source, and the sdk version matches your sdk.
```ruby
$ editor boost-cmake.rb
BOOST_VERSION=1_51_0
IPHONEOS_SDK_VERSION='6.0'
IPHONEOS_DEPLOYMENT_TARGET='5.1'
DEVELOPER_DIR='/Applications/Xcode.app/Contents/Developer'
```
Fix the boost sources:
```sh
$ rm -r boost-zero/boost/graph_parallel
$ rm -r boost-zero/boost/mpi
$ rm -r boost-zero/boost/python
$ ruby -i~ -p -e '$_ = nil if /boost\/(graph_parallel|mpi|python)/ === $_' boost-zero/CMakeLists.txt
```
```diff
+++ boost-zero/boost/context/CMakeLists.txt
- src/stack_utils_posix.cpp
```
```diff
+++ boost-zero/boost/core/CMakeLists.txt
-set(Boost_VERSION_MINOR 50)
+set(Boost_VERSION_MINOR 51)
-string(REPLACE "." "_" BOOST_LIB_VERSION "${Boost_VERSION}")
+set(BOOST_LIB_VERSION "${Boost_VERSION_MAJOR}_${Boost_VERSION_MINOR}_${Boost_VERSION_PATCH}")
```
```diff
+++ boost-zero/boost/inspect/CMakeLists.txt
unnamed_namespace_check.cpp
+ deprecated_macro_check.cpp
```
Go!
```sh
$ ./boost-cmake.rb
```
You should now have a framework in `./boost.framework`. Drag'n'drop to Xcode and get compiling!
## References, inspirations, etc.
- http://code.google.com/p/ios-cmake/
- http://gitorious.org/boostoniphone/boostoniphone
- http://www.cmake.org/Wiki/CMake_Cross_Compiling
- https://gitorious.org/~galbraithjoseph/boostoniphone/galbraithjosephs-boostoniphone
没有合适的资源?快使用搜索试试~ 我知道了~
为iOS构建提升.zip
共6个文件
rb:2个
gitignore:1个
patch:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 107 浏览量
2023-03-31
23:10:36
上传
评论
收藏 9KB ZIP 举报
温馨提示
为iOS构建提升
资源推荐
资源详情
资源评论
收起资源包目录
为iOS构建提升.zip (6个子文件)
boost-ios-master
boost-zero
boost-jam.patch 5KB
.gitmodules 91B
boost-jam.rb 6KB
boost-cmake.rb 7KB
.gitignore 45B
README.md 2KB
共 6 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功