When using a recent version of CMake (3.14+), this should make it possible to:
- build SDL for iOS, both static and dynamic
- build SDL test apps (as iOS .app bundles)
- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis)
To use, set the following CMake variables when running CMake's configuration stage:
- CMAKE_SYSTEM_NAME=iOS
- CMAKE_OSX_SYSROOT=<SDK> (examples: iphoneos, iphonesimulator, iphoneos12.4, /full/path/to/iPhoneOS.sdk, etc.)
- CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures> (example: "arm64;armv7s")
Examples:
- for Simulator, using the latest, installed SDK:
cmake path/to/SDL -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
- for Device, using the latest, installed SDK, 64-bit only
cmake path/to/SDL -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64
- for Device, using the latest, installed SDK, mixed 32/64 bit
cmake path/to/SDL -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"
- for Device, using a specific SDK revision (iOS 12.4, in this example):
cmake path/to/SDL -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64
- for Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
cmake path/to/SDL -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
These are test programs for the SDL library:
checkkeys Watch the key events to check the keyboard
loopwave Audio test -- loop playing a WAV file
loopwavequeue Audio test -- loop playing a WAV file with SDL_QueueAudio
testaudioinfo Lists audio device capabilities
testerror Tests multi-threaded error handling
testfile Tests RWops layer
testgl2 A very simple example of using OpenGL with SDL
testiconv Tests international string conversion
testjoystick List joysticks and watch joystick events
testkeys List the available keyboard keys
testloadso Tests the loadable library layer
testlock Hacked up test of multi-threading and locking
testmultiaudio Tests using several audio devices
testoverlay2 Tests the overlay flickering/scaling during playback.
testplatform Tests types, endianness and cpu capabilities
testsem Tests SDL's semaphore implementation
testshape Tests shaped windows
testsprite2 Example of fast sprite movement on the screen
testthread Hacked up test of multi-threading
testtimer Test the timer facilities
testver Check the version and dynamic loading and endianness
testwm2 Test window manager -- title, icon, events
torturethread Simple test for thread creation/destruction
controllermap Useful to generate Game Controller API compatible maps
This directory contains sample.wav, which is a sample from Will Provost's
song, The Living Proof:
From the album The Living Proof
Publisher: 5 Guys Named Will
Copyright 1996 Will Provost
You can get a copy of the full song (and album!) from iTunes...
https://itunes.apple.com/us/album/the-living-proof/id4153978
or Amazon...
http://www.amazon.com/The-Living-Proof-Will-Provost/dp/B00004R8RH
Thanks to Will for permitting us to distribute this sample with SDL!