PortMidi / portmidi

portmidi is a cross-platform MIDI input/output library
Other
116 stars 31 forks source link

Add support for targeting iOS #65

Open fwcd opened 5 months ago

fwcd commented 5 months ago

Since iOS is largely based on the same frameworks as macOS, the changes required to support iOS are minor. It does, however, lack some time-related methods, most notably CoreAudio/HostTime.h and the suggested approach appears to be using mach time instead: https://developer.apple.com/library/archive/qa/qa1643/_index.html

With this PR portmidi can now be built for iOS simply by changing the CMAKE_SYSTEM_NAME:

cmake -B build -DCMAKE_SYSTEM_NAME=iOS
cmake --build build