iOS: Use OBJCXX when FORCE_CXX is enabled.

This commit is contained in:
David Reid
2026-07-11 09:56:18 +10:00
parent 00ce58dfa8
commit 87e22c68dd
+5
View File
@@ -504,9 +504,14 @@ endif()
# For macOS (MA_APPLE_DESKTOP, "Darwin" in CMake), the code uses CoreAudio that does not need Objective-C. # 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. # For the other Apple platforms, the code uses AVFoundation that requires Objective-C.
if(APPLE AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Darwin")) if(APPLE AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
if(MINIAUDIO_FORCE_CXX)
enable_language(OBJCXX)
set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJCXX)
else()
enable_language(OBJC) enable_language(OBJC)
set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJC) set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJC)
endif() endif()
endif()
# Static Libraries # Static Libraries
add_library(miniaudio add_library(miniaudio