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
This commit is contained in:
Sam Lantinga 2022-03-18 07:36:16 -07:00
parent 1868c5b521
commit d3cc5764c0
1 changed files with 0 additions and 6 deletions

View File

@ -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()