Skip to content

Commit c6a5bc8

Browse files
committed
version 1.86.0
1 parent 7dcbc1c commit c6a5bc8

File tree

4 files changed

+346
-254
lines changed

4 files changed

+346
-254
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- name: Build
1616
run: |
17-
export ICU4C_RELEASE_LINK=https://github.com/apotocki/icu4c-iosx/releases/download/76.1.0
18-
scripts/build.sh
17+
export ICU4C_RELEASE_LINK=https://github.com/apotocki/icu4c-iosx/releases/download/76.1.4
18+
scripts/build.sh -p=macosx-both,ios,iossim-both,catalyst-both,xros,xrossim-both,watchos,watchossim-both,tvos,tvossim-both
1919
for i in frameworks/*.xcframework/; do cd frameworks && zip -9 -r "$(basename -- $i).zip" $(basename -- $i) & done; wait
2020
cd frameworks
2121
mv Headers include

README.md

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Boost C++ for iOS, visionOS, macOS (Intel & Apple Silicon M1) & Catalyst - arm64 / x86_64
1+
# Boost C++ for iOS, watchOS, tvOS, visionOS, macOS, Catalyst, Simulators - Intel(x86_64) / Apple Silicon(arm64)
22

33
Supported version: 1.86.0 (use the appropriate tag to select the version)
44

5-
This repo provides a universal script for building static Boost C++ libraries for use in iOS, visionOS, and Mac OS X & Catalyst applications.
6-
The latest supported Boost version is taken from: https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.bz2
5+
This repo provides a universal script for building static Boost C++ libraries for use in iOS, watchOS, tvOS, visionOS, and macOS & Catalyst applications.
6+
7+
Since the Boost distribution URLs are often broken and change, the script tries to download it from the links specified in the LOCATIONS file in the master branch. Only after the SHA256 hash of the downloaded archive is verified, the libraries are unpacked and compiled.
78

89
## Building libraries
910
atomic, charconv, chrono, cobalt (requires apple clang-15.0.0 or later), container, context, contract, coroutine, date_time, exception, fiber, filesystem, graph, iostreams, json, locale, log, math, nowide, program_options, random, regex, serialization, stacktrace, system, test, thread, timer, type_erasure, url, wave
@@ -20,40 +21,71 @@ graph_parallel, mpi, python
2021

2122
## Building notes
2223
1) The 'locale' and 'regex' libraries are built using the ICU backend. ICU build scripts are taken from https://github.com/apotocki/icu4c-iosx and run using the 'pod' utility.
23-
2) The 'test' library is built for iOS with the BOOST_TEST_NO_MAIN flag.
24+
2) The 'test' library is built for iOS and visionOS with the BOOST_TEST_NO_MAIN flag.
25+
3) The 'test' library is built for watchOS and tvOS with the BOOST_TEST_NO_MAIN and BOOST_TEST_DISABLE_ALT_STACK flags.
2426

25-
## How to build?
26-
- Manually
27+
# Build Manually
2728
```
2829
# clone the repo
2930
git clone -b 1.86.0 https://github.com/apotocki/boost-iosx
3031
3132
# build libraries
3233
cd boost-iosx
3334
scripts/build.sh
34-
35+
36+
# However, if you wish, you can skip building the ICU library during the boost build and use pre-built binaries from my ICU repository:
37+
# ICU4C_RELEASE_LINK=https://github.com/apotocki/icu4c-iosx/releases/download/76.1.4 scripts/build.sh
38+
3539
# have fun, the result artifacts will be located in 'frameworks' folder.
3640
# Then you can add desirable xcframeworks in your XCode project. The process is described, e.g., at https://www.simpleswiftguide.com/how-to-add-xcframework-to-xcode-project/
37-
```
38-
- Use cocoapods. Add the following lines into your project's Podfile:
41+
```
42+
# Selecting Platforms and Architectures
43+
build.sh without arguments will build xcframeworks for iOS, macOS, Catalyst and also for watchOS, tvOS, visionOS if their SDKs are installed on the system. It will also build xcframeworks for their simulators with the architecture (arm64 or x86_64) depending on the current host.
44+
If you are interested in a specific set of platforms and architectures, you can specify them explicitly using the -p argument, for example:
45+
```
46+
scripts/build.sh -p=ios,iossim-x86_64
47+
# builts xcframeworks only for iOS and iOS Simulator with x86_64 architecture
48+
```
49+
Here is a list of all possible values for '-p' option:
50+
```
51+
macosx,macosx-arm64,macosx-x86_64,macosx-both,ios,iossim,iossim-arm64,iossim-x86_64,iossim-both,catalyst,catalyst-arm64,catalyst-x86_64,catalyst-both,xros,xrossim,xrossim-arm64,xrossim-x86_64,xrossim-both,tvos,tvossim,tvossim-both,tvossim-arm64,tvossim-x86_64,watchos,watchossim,watchossim-both,watchossim-arm64,watchossim-x86_64
52+
```
53+
Suffix '-both' means that xcframeworks will be built for both arm64 and x86_64 architectures.
54+
The platform names for macosx and simulators without an architecture suffix (e.g. macosx, iossim, tvossim) mean that xcframeworks are only built for the current host architecture.
55+
56+
## Selecting Libraries
57+
If you want to build specific boost libraries, specify them with the -l option:
58+
```
59+
scripts/build.sh -l=log,program_options
60+
# Note: Some libraries depend on other Boost libraries. In this case, you should explicitly add them all in the -l option.
61+
```
62+
## Rebuild option
63+
To rebuild the libraries without using the results of previous builds, use the --rebuild option
64+
```
65+
scripts/build.sh -p=ios,iossim-x86_64 --rebuild
66+
67+
```
68+
69+
# Build Using Cocoapods.
70+
Add the following lines into your project's Podfile:
3971
```
4072
use_frameworks!
4173
pod 'boost-iosx', '~> 1.86.0'
4274
# or optionally more precisely e.g.:
43-
# pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx', :tag => '1.86.0.2'
75+
# pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx', :tag => '1.86.0.3'
4476
```
45-
If you want to use particular boost libraries, specify them as in the following example for log and program_options libraries:
77+
If you want to use specific boost libraries, specify them as in the following example for log and program_options libraries:
4678
```
4779
pod 'boost-iosx/log', '~> 1.86.0'
4880
pod 'boost-iosx/program_options', '~> 1.86.0'
49-
# note: Some libraries depend on other Boost libraries. In this case, you should explicitly add all their dependencies to your Podfile.
81+
# Note: Some libraries depend on other Boost libraries. In this case, you should explicitly add all their dependencies to your Podfile.
5082
```
5183
Then install new dependencies:
5284
```
5385
pod install --verbose
5486
```
5587

56-
## As an advertisement…
88+
## As an advertisement…
5789
The Boost libraries built by this project are used in my iOS application on the App Store:
5890

5991
[<table align="center" border=0 cellspacing=0 cellpadding=0><tr><td><img src="https://is4-ssl.mzstatic.com/image/thumb/Purple112/v4/78/d6/f8/78d6f802-78f6-267a-8018-751111f52c10/AppIcon-0-1x_U007emarketing-0-10-0-85-220.png/460x0w.webp" width="70"/></td><td><a href="https://apps.apple.com/us/app/potohex/id1620963302">PotoHEX</a><br>HEX File Viewer & Editor</td><tr></table>]()

boost-iosx.podspec

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
Pod::Spec.new do |s|
22
s.name = "boost-iosx"
3-
s.version = "1.86.0.2"
4-
s.summary = "Boost C++ libraries for macOS, iOS, and visionOS, including both arm64 and x86_64 builds for macOS, Mac Catalyst, iOS Simulator, and visionOS Simulator."
3+
s.version = "1.86.0.3"
4+
s.summary = "Boost C++ libraries for macOS, iOS, watchOS, tvOS, and visionOS, including builds for Mac Catalyst, iOS Simulator, watchOS Simulator, tvOS Simulator, and visionOS Simulator."
55
s.homepage = "https://github.com/apotocki/boost-iosx"
66
s.license = "Boost Software License"
77
s.author = { "Alexander Pototskiy" => "alex.a.potocki@gmail.com" }
88
s.social_media_url = "https://www.linkedin.com/in/alexander-pototskiy"
9-
s.osx.deployment_target = "11.0"
109
s.ios.deployment_target = "13.4"
10+
s.osx.deployment_target = "11.0"
11+
s.tvos.deployment_target = "13.0"
12+
s.watchos.deployment_target = "11.0"
1113
s.visionos.deployment_target = "1.0"
12-
s.osx.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
1314
s.ios.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
15+
s.osx.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
16+
s.tvos.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
17+
s.watchos.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
1418
s.visionos.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
19+
s.ios.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
20+
s.osx.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
21+
s.tvos.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
22+
s.watchos.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
23+
s.visionos.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
1524
s.static_framework = true
1625
s.prepare_command = "sh scripts/build.sh"
1726
s.source = { :git => "https://github.com/apotocki/boost-iosx.git", :tag => "#{s.version}" }

0 commit comments

Comments
 (0)