Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Toolchain for cross-compiling to iOS using Xcode | ||
# | ||
# Set CMAKE_OSX_ROOT to SDK you want to target and enable all desired | ||
# architectures in CMAKE_OSX_ARCHITECTURES. You have to addd modules/ directory | ||
# to CMAKE_MODULE_PATH before using the toolchain file so the iOS platform file | ||
# can be found. | ||
# | ||
# mkdir build-ios && cd build-ios | ||
# cmake -DCMAKE_MODULE_PATH=/path/to/toolchains/modules/ \ | ||
# -DCMAKE_TOOLCHAIN_FILE=../toolchains/generic/iOS.cmake \ | ||
# -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \ | ||
# -DCMAKE_OSX_ARCHITECTURES="arm64;armv7;armv7s" -G Xcode .. | ||
# | ||
|
||
# We just need to name the platform differently so CMAKE_CROSSCOMPILING is set | ||
set(CMAKE_SYSTEM_NAME "iOS") | ||
|
||
# Required to make CMake's test_compile stuff pass | ||
set(CMAKE_MACOSX_BUNDLE ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# Platform file for generic/iOS.cmake toolchain | ||
# | ||
|
||
# It's just Darwin after all | ||
include(Platform/Darwin) |