H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
202 stars 80 forks source link

Don't try to enable Metal on older Macs #1588

Closed dpogue closed 1 month ago

dpogue commented 1 month ago

Metal was introduced in OS X 10.11 El Capitan, so the framework doesn't exist on older Apple systems. Instead of trying to unconditionally use it on Apple devices, check for the framework first.

Note: Metal still only works with the Xcode project generator, and not with Makefiles/Ninja because CMake doesn't yet know how to handle the metal shaders.

colincornaby commented 1 month ago

I think technically the fix is to check the macOS SDK version. That would handle the edge case you mentioned. We only want to try to build Metal when the macOS 10.11 SDK is present.

Unfortunately that's sent me down a Stack Overflow rabbit hole on how to check for that. Let me dig a little deeper. Ideally we'd detect for the Metal SDK just like we would for the Direct3D SDK or any other library.