Closed geooot closed 9 months ago
Thanks! I actually haven't paid much attention to iOS yet, but since you opened that can of worms :D ... I think a few more changes are needed for using the GL backends. Maybe you could add those?
Here's how it should look like:
Basically as pseudo code
if (macOS or iOS) {
=> Foundation, AudioToolbox
if (Metal) {
=> Metal, MetalKit
}
if (iOS) {
=> UIKit, AVFoundation
if (GL) {
=> OpenGLES, GLKit
}
}
if (macOS) {
=> Cocoa, QuartzCore
if (GL) {
=> OpenGL
}
}
...I think that's it.
Ah that pseudo code makes sense! I totally ignored OpenGL lol. I went ahead and implemented it and confirmed that the GL build for macOS works.
I noticed that GLKit is a macOS framework as well. Should that be included for macOS targets as well?
▶ ls /System/Library/Frameworks/ | grep GL
AGL.framework
GLKit.framework
GLUT.framework
OpenGL.framework
I noticed that GLKit is a macOS framework as well.
Nope, GLKit is only used in the iOS code path.
Ok merged, many thanks!
When trying to use sokol-zig with an iOS target, Cocoa and QuartzCore frameworks are incorrectly included during linking. This change aims to make it such that only correct frameworks are linked depending on the target.
Referenced libSokol in pacman.zig to make this PR.