cmake: Weak link to GameController.framework to handle older OSes
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20a743a..7b60335 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2055,7 +2055,9 @@ elseif(APPLE)
endif()
if(SDL_FRAMEWORK_GAMECONTROLLER)
find_library(GAMECONTROLLER GameController)
- list(APPEND EXTRA_LIBS ${GAMECONTROLLER})
+ if(GAMECONTROLLER)
+ list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,GameController")
+ endif()
endif()
if(SDL_FRAMEWORK_METAL)
if(IOS OR TVOS)