add example with docs

This commit is contained in:
talksik
2025-07-15 08:46:45 -07:00
commit 6cf9975e84
9 changed files with 158 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/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/