From 3ad22ec1e9b67cbcbebfa09c40e2436ac970de36 Mon Sep 17 00:00:00 2001 From: scivision Date: Fri, 1 Sep 2023 11:57:32 -0400 Subject: [PATCH 1/2] readme: use modern 'cmake -B build' syntax for brevity --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 829a13f..07de6c5 100644 --- a/README.md +++ b/README.md @@ -48,22 +48,20 @@ Tested with the following combinations: * _MAC_CATALYST_ - to build iOS for Mac (Catalyst, x86_64) * _MAC_CATALYST_ARM64_ - to build iOS for Mac on Apple Silicon (Catalyst, arm64) -# Example usage +# Example usage **_NOTE_: Change the `-DPLATFORM` to an applicable value if targeting another platform.** ```bash cd example/example-lib -mkdir build -cd build -cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=OS64 -cmake --build . --config Release +cmake -B build -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=OS64 +cmake --build build --config Release ``` This will build the library for the given PLATFORM. In this case, iOS with the arm64 architecture. ### COMBINED Options -The options called *COMBINED (OS64COMBINED, TVOSCOMBINED and WATCHOSCOMBINED) will build complete FAT-libraries for -the given platform. These FAT-libraries include slices for both device and simulator, making the distribution and +The options called *COMBINED (OS64COMBINED, TVOSCOMBINED and WATCHOSCOMBINED) will build complete FAT-libraries for +the given platform. These FAT-libraries include slices for both device and simulator, making the distribution and usage of the library much more simple! Example: @@ -84,7 +82,7 @@ cmake --install . --config Release # Necessary to build combined library `CMAKE_OSX_ARCHITECTURES` - Architectures being compiled for (generated from PLATFORM). -`APPLE_TARGET_TRIPLE` - Used by autoconf build systems. +`APPLE_TARGET_TRIPLE` - Used by autoconf build systems. ### Additional Options `-DENABLE_BITCODE=(BOOL)` - Disabled by default, specify TRUE or 1 to enable bitcode @@ -97,7 +95,7 @@ cmake --install . --config Release # Necessary to build combined library `-DARCHS=(STRING)` - Valid values are: armv7, armv7s, arm64, i386, x86_64, armv7k, arm64_32. By default it will build for all valid architectures based on `-DPLATFORM` (see above) -__*To combine all platforms into the same FAT-library, either build any of the "*COMBINED*" platform types OR use the +__*To combine all platforms into the same FAT-library, either build any of the "*COMBINED*" platform types OR use the LIPO tool. More information on how to combine libraries with LIPO is readily available on the net.*__ ## Thanks To From b2515ef33e981229105e334957b80a0823147201 Mon Sep 17 00:00:00 2001 From: scivision Date: Fri, 1 Sep 2023 11:59:24 -0400 Subject: [PATCH 2/2] readme: lint to use standard Markdown syntax --- README.md | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 07de6c5..50cbd60 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,32 @@ A CMake toolchain file for iOS (+ Catalyst), watchOS, tvOS and macOS development with full simulator support and toggleable options! ### NEW! + * Experimental Catalyst support (iOS on macOS) * macOS support and experimental Apple Silicon support * Deprecated options now removed. * Builds now run on Github Actions -ios-cmake -========= +# ios-cmake [![catalyst-jobs](https://github.com/leetal/ios-cmake/actions/workflows/catalyst.yml/badge.svg)](https://github.com/leetal/ios-cmake/actions/workflows/catalyst.yml)   [![combined-jobs](https://github.com/leetal/ios-cmake/actions/workflows/combined.yml/badge.svg)](https://github.com/leetal/ios-cmake/actions/workflows/combined.yml)   [![ios-jobs](https://github.com/leetal/ios-cmake/actions/workflows/ios.yml/badge.svg)](https://github.com/leetal/ios-cmake/actions/workflows/ios.yml) [![macos-jobs](https://github.com/leetal/ios-cmake/actions/workflows/macos.yml/badge.svg)](https://github.com/leetal/ios-cmake/actions/workflows/macos.yml)   [![tvos-jobs](https://github.com/leetal/ios-cmake/actions/workflows/tvos.yml/badge.svg)](https://github.com/leetal/ios-cmake/actions/workflows/tvos.yml)   [![watchos-jobs](https://github.com/leetal/ios-cmake/actions/workflows/watchos.yml/badge.svg)](https://github.com/leetal/ios-cmake/actions/workflows/watchos.yml) Tested with the following combinations: + * XCode 11.7 - - iOS SDK 9.0 & 11.0 - - watchOS SDK 5.0 - - tvOS SDK 11.0 + * iOS SDK 9.0 & 11.0 + * watchOS SDK 5.0 + * tvOS SDK 11.0 * XCode 12.5.1 - - iOS SDK 12.0 - - watchOS SDK 7.0 - - macOS SDK 10.13 - - iOS, watchOS, tvOS combined builds, mixed SDKs + * iOS SDK 12.0 + * watchOS SDK 7.0 + * macOS SDK 10.13 + * iOS, watchOS, tvOS combined builds, mixed SDKs * XCode 13.2 - - Mac Catalyst SDK 13.0 - - macOS SDK 11.0 + * Mac Catalyst SDK 13.0 + * macOS SDK 11.0 ## Platform flag options (-DPLATFORM=_flag_) @@ -49,6 +50,7 @@ Tested with the following combinations: * _MAC_CATALYST_ARM64_ - to build iOS for Mac on Apple Silicon (Catalyst, arm64) # Example usage + **_NOTE_: Change the `-DPLATFORM` to an applicable value if targeting another platform.** ```bash @@ -59,12 +61,14 @@ cmake --build build --config Release This will build the library for the given PLATFORM. In this case, iOS with the arm64 architecture. -### COMBINED Options +## COMBINED Options + The options called *COMBINED (OS64COMBINED, TVOSCOMBINED and WATCHOSCOMBINED) will build complete FAT-libraries for the given platform. These FAT-libraries include slices for both device and simulator, making the distribution and usage of the library much more simple! Example: + ```bash cmake . -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=OS64COMBINED cmake --build . --config Release @@ -76,6 +80,7 @@ cmake --install . --config Release # Necessary to build combined library --- ### Exposed Variables + `XCODE_VERSION` - Version number (not including Build version) of Xcode detected. `SDK_VERSION` - Version of SDK being used. @@ -85,6 +90,7 @@ cmake --install . --config Release # Necessary to build combined library `APPLE_TARGET_TRIPLE` - Used by autoconf build systems. ### Additional Options + `-DENABLE_BITCODE=(BOOL)` - Disabled by default, specify TRUE or 1 to enable bitcode `-DENABLE_ARC=(BOOL)` - Enabled by default, specify FALSE or 0 to disable ARC