mirror of https://github.com/encounter/SDL.git
Fixed bug 3882 - cmake fix for osx
Ozkan Sezer In my cross-build environment with cmake-2.8.12.1, cmake does not add SDL_coreaudio.m to its makefiles and the result is a failure. The fix is simple: set the language to C for it as it is done at other places in CMakeLists.txt.
This commit is contained in:
parent
dff56c3497
commit
f658a737f6
|
@ -1352,7 +1352,7 @@ elseif(APPLE)
|
||||||
# !!! FIXME: we need Carbon for some very old API calls in
|
# !!! FIXME: we need Carbon for some very old API calls in
|
||||||
# !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
|
# !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
|
||||||
# !!! FIXME: how to dump those.
|
# !!! FIXME: how to dump those.
|
||||||
if (APPLE AND NOT IOS)
|
if(NOT IOS)
|
||||||
set(SDL_FRAMEWORK_COCOA 1)
|
set(SDL_FRAMEWORK_COCOA 1)
|
||||||
set(SDL_FRAMEWORK_CARBON 1)
|
set(SDL_FRAMEWORK_CARBON 1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1373,6 +1373,8 @@ elseif(APPLE)
|
||||||
if(SDL_AUDIO)
|
if(SDL_AUDIO)
|
||||||
set(SDL_AUDIO_DRIVER_COREAUDIO 1)
|
set(SDL_AUDIO_DRIVER_COREAUDIO 1)
|
||||||
file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m)
|
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(SOURCE_FILES ${SOURCE_FILES} ${AUDIO_SOURCES})
|
||||||
set(HAVE_SDL_AUDIO TRUE)
|
set(HAVE_SDL_AUDIO TRUE)
|
||||||
set(SDL_FRAMEWORK_COREAUDIO 1)
|
set(SDL_FRAMEWORK_COREAUDIO 1)
|
||||||
|
|
Loading…
Reference in New Issue