From fa910fc629751da9c990c8d5fb34405a0e459068 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 15 Jun 2022 23:31:20 -0700 Subject: [PATCH] Mac: Start bringing up Universal build support --- src/platform/qt/CMakeLists.txt | 5 ++++- src/platform/sdl/CMakeLists.txt | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index 9ad0d27f1..57fda3249 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -401,7 +401,10 @@ if(QT_STATIC) find_package(Cups) find_package(${QT}PrintSupport) list(APPEND QT_LIBRARIES Cups ${QT}::PrintSupport ${QT}::QCocoaIntegrationPlugin ${QT}::CoreAudioPlugin ${QT}::AVFServicePlugin ${QT}::QCocoaPrinterSupportPlugin) - list(APPEND QT_LIBRARIES ${QT}AccessibilitySupport ${QT}CglSupport ${QT}ClipboardSupport ${QT}FontDatabaseSupport ${QT}GraphicsSupport ${QT}ThemeSupport) + list(APPEND QT_LIBRARIES ${QT}AccessibilitySupport ${QT}ClipboardSupport ${QT}FontDatabaseSupport ${QT}GraphicsSupport ${QT}ThemeSupport) + if(CMAKE_SYSTEM_VERSION VERSION_LESS "19.0") + list(APPEND QT_LIBRARIES ${QT}CglSupport) + endif() list(APPEND QT_LIBRARIES "-framework AVFoundation" "-framework CoreMedia" "-framework SystemConfiguration" "-framework Security") set_target_properties(${QT}::Core PROPERTIES INTERFACE_LINK_LIBRARIES "${QTPCRE}") elseif(UNIX) diff --git a/src/platform/sdl/CMakeLists.txt b/src/platform/sdl/CMakeLists.txt index 47f05cc4d..cacf0bc48 100644 --- a/src/platform/sdl/CMakeLists.txt +++ b/src/platform/sdl/CMakeLists.txt @@ -56,6 +56,9 @@ elseif(APPLE) if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "17.0") # Darwin 17.x is macOS 10.13 list(APPEND SDL_LIBRARY "-framework Metal") endif() + if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "19.0") # Darwin 19.x is macOS 10.15 + list(APPEND SDL_LIBRARY "-framework GameController" "-framework CoreHaptics") + endif() endif() if(NOT SDLMAIN_LIBRARY)