25 lines
869 B
Bash
Executable File
25 lines
869 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
echo "THIS SERVES AS AN EXAMPLE OF HOW TO CROSS COMPILE THIS FOR USE ON IOS"
|
|
|
|
# NOTE: DVCPKG_TARGET_ARCHITECTURE is for a setting within the set DVCPKG_CHAINLOAD_TOOLCHAIN_FILE
|
|
# if using another toolchain or none at all, consider using the following native cmake variables
|
|
# - CMAKE_OSX_SYSROOT
|
|
# - CMAKE_OSX_DEPLOYMENT_TARGET
|
|
# - CMAKE_OSX_ARCHITECTURES
|
|
# - MACOSX_BUNDLE_GUI_IDENTIFIER
|
|
# - ...
|
|
# Qt has toolchain files that take care of these sorts of things, as does `vcpkg` as shown below
|
|
|
|
rm -rf build
|
|
cmake -Bbuild -S. -GNinja \
|
|
-DVCPKG_TARGET_TRIPLET=arm64-ios \
|
|
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
|
|
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/ios.cmake \
|
|
-DVCPKG_TARGET_ARCHITECTURE=arm64 \
|
|
-DVCPKG_BINARY_SOURCES=clear \
|
|
-DVCPKG_INSTALL_OPTIONS="--debug"
|
|
|
|
|
|
cmake --build build/
|