From 068484206c18fdc289c9b2e9c12348cee3142c37 Mon Sep 17 00:00:00 2001 From: sguo35 Date: Sun, 27 Mar 2022 16:06:24 -0700 Subject: [PATCH] build-macos: fix SDL build for macOS Fixes the SDL build for MacOS by forcing SDL_FILE to ON if Apple. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11a4598135..a3ce709a05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -553,8 +553,16 @@ find_package(Threads REQUIRED) if (APPLE) # Umbrella framework for everything GUI-related + find_library(APPKIT_LIBRARY AppKit) + find_library(APPSERV_LIBRARY ApplicationServices) + find_library(CARBON_LIBRARY Carbon) find_library(COCOA_LIBRARY Cocoa) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CORESERV_LIBRARY CoreServices) + find_library(FOUNDATION_LIBRARY Foundation) + find_library(IOK_LIBRARY IOKit) set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY}) + set(SDL_FILE ON) elseif (WIN32) # WSAPoll and SHGetKnownFolderPath (AppData/Roaming) didn't exist before WinNT 6.x (Vista) add_definitions(-D_WIN32_WINNT=0x0600 -DWINVER=0x0600)