cmake: Weak link to GameController.framework to handle older OSes

This commit is contained in:
Cameron Gutman 2021-11-24 23:34:45 +03:00
parent bc409163a8
commit 2fa35757a9
1 changed files with 3 additions and 1 deletions

View File

@ -2055,7 +2055,9 @@ elseif(APPLE)
endif() endif()
if(SDL_FRAMEWORK_GAMECONTROLLER) if(SDL_FRAMEWORK_GAMECONTROLLER)
find_library(GAMECONTROLLER GameController) find_library(GAMECONTROLLER GameController)
list(APPEND EXTRA_LIBS ${GAMECONTROLLER}) if(GAMECONTROLLER)
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,GameController")
endif()
endif() endif()
if(SDL_FRAMEWORK_METAL) if(SDL_FRAMEWORK_METAL)
if(IOS OR TVOS) if(IOS OR TVOS)