Modern CMake doesn't need "LANGUAGE C" for Objective-C CMake 3.19 fails to compile Objective-C with that property set Fixes https://github.com/libsdl-org/SDL/issues/5418
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc2264a..59bacf0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1838,8 +1838,6 @@ elseif(APPLE)
if(SDL_FILE)
file(GLOB EXTRA_SOURCES ${SDL2_SOURCE_DIR}/src/file/cocoa/*.m)
set(SOURCE_FILES ${EXTRA_SOURCES} ${SOURCE_FILES})
- # !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
- set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
set(HAVE_SDL_FILE TRUE)
endif()
@@ -1860,8 +1858,6 @@ elseif(APPLE)
if(SDL_AUDIO)
set(SDL_AUDIO_DRIVER_COREAUDIO 1)
file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m)
- # !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
- set_source_files_properties(${AUDIO_SOURCES} PROPERTIES LANGUAGE C)
set(SOURCE_FILES ${SOURCE_FILES} ${AUDIO_SOURCES})
set(HAVE_SDL_AUDIO TRUE)
set(SDL_FRAMEWORK_COREAUDIO 1)
@@ -1961,8 +1957,6 @@ elseif(APPLE)
if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_COCOA 1)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/cocoa/*.m)
- # !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
- set_source_files_properties(${FILESYSTEM_SOURCES} PROPERTIES LANGUAGE C)
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
set(HAVE_SDL_FILESYSTEM TRUE)
endif()