From 2f4bd45e5ee47eeae9ce15c06f36fc9d613c1338 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sat, 15 Oct 2022 20:24:22 +0200 Subject: [PATCH] macOS: Link Cocoa framework explicitly when not building with Qt6 Seems to be needed for the classes used by DuckStation's GL context code. --- src/frontend/qt_sdl/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt index ed9294ef..bfa58bfe 100644 --- a/src/frontend/qt_sdl/CMakeLists.txt +++ b/src/frontend/qt_sdl/CMakeLists.txt @@ -100,6 +100,10 @@ if (WIN32) ../glad/glad_wgl.c ) elseif (APPLE) + if (NOT USE_QT6) + find_library(COCOA_LIB Cocoa) + target_link_libraries(melonDS PRIVATE ${COCOA_LIB}) + endif() target_sources(melonDS PRIVATE ../duckstation/gl/context_agl.mm )