From 00ce58dfa82e3cc67132637375ef8da6685830a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E7=AB=9C=20=28Tommy=20Li=29?= Date: Fri, 29 May 2026 17:17:37 -0500 Subject: [PATCH] Exclude macOS from Objective-C handling --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39e771f1..516c209b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -500,7 +500,10 @@ if (UNIX) endif() endif() -if(APPLE) +# APPLE is true for all Apple platforms. +# For macOS (MA_APPLE_DESKTOP, "Darwin" in CMake), the code uses CoreAudio that does not need Objective-C. +# For the other Apple platforms, the code uses AVFoundation that requires Objective-C. +if(APPLE AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Darwin")) enable_language(OBJC) set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJC) endif()