A build script to compile Boost (1.51.0 or so) for iOS.
Because your iPhone doesn't get enough c++.
Prerequisites:
Sync 'n build:
$ ./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!
Prerequisites:
Clone this repo:
$ git clone http://github.com/sagran/boost-ios.git
Clone other repos:
$ 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.
$ 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:
$ 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
+++ boost-zero/boost/context/CMakeLists.txt
- src/stack_utils_posix.cpp
+++ 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}")
+++ boost-zero/boost/inspect/CMakeLists.txt
unnamed_namespace_check.cpp
+ deprecated_macro_check.cpp
Go!
$ ./boost-cmake.rb
You should now have a framework in ./boost.framework
. Drag'n'drop to Xcode and get compiling!