CMakeLists.txt
changeset 10348 58e8745fb4e1
parent 10329 ad0bee16b6b9
child 10349 4b978b7998aa
equal deleted inserted replaced
10347:221061d874e9 10348:58e8745fb4e1
  1204     message_error("SDL_FILE must be enabled to build on MacOS X")
  1204     message_error("SDL_FILE must be enabled to build on MacOS X")
  1205   endif()
  1205   endif()
  1206 
  1206 
  1207   if(SDL_AUDIO)
  1207   if(SDL_AUDIO)
  1208     set(SDL_AUDIO_DRIVER_COREAUDIO 1)
  1208     set(SDL_AUDIO_DRIVER_COREAUDIO 1)
  1209     file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.c)
  1209     file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m)
  1210     set(SOURCE_FILES ${SOURCE_FILES} ${AUDIO_SOURCES})
  1210     set(SOURCE_FILES ${SOURCE_FILES} ${AUDIO_SOURCES})
  1211     set(HAVE_SDL_AUDIO TRUE)
  1211     set(HAVE_SDL_AUDIO TRUE)
  1212     set(SDL_FRAMEWORK_COREAUDIO 1)
  1212     set(SDL_FRAMEWORK_AVFOUNDATION 1)
  1213     set(SDL_FRAMEWORK_AUDIOUNIT 1)
       
  1214     set(SDL_FRAMEWORK_AUDIOTOOLBOX 1)
       
  1215   endif()
  1213   endif()
  1216 
  1214 
  1217   if(SDL_JOYSTICK)
  1215   if(SDL_JOYSTICK)
  1218     set(SDL_JOYSTICK_IOKIT 1)
  1216     set(SDL_JOYSTICK_IOKIT 1)
  1219     file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
  1217     file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
  1278   endif()
  1276   endif()
  1279   if(SDL_FRAMEWORK_CARBON)
  1277   if(SDL_FRAMEWORK_CARBON)
  1280     find_library(CARBON_LIBRARY Carbon)
  1278     find_library(CARBON_LIBRARY Carbon)
  1281     list(APPEND EXTRA_LIBS ${CARBON_LIBRARY})
  1279     list(APPEND EXTRA_LIBS ${CARBON_LIBRARY})
  1282   endif()
  1280   endif()
  1283   if(SDL_FRAMEWORK_COREAUDIO)
  1281   if(SDL_FRAMEWORK_AVFOUNDATION)
  1284     find_library(COREAUDIO CoreAudio)
  1282     find_library(AVFOUNDATION AVFoundation)
  1285     list(APPEND EXTRA_LIBS ${COREAUDIO})
  1283     list(APPEND EXTRA_LIBS ${AVFOUNDATION})
  1286   endif()
       
  1287   if(SDL_FRAMEWORK_AUDIOUNIT)
       
  1288     find_library(AUDIOUNIT AudioUnit)
       
  1289     list(APPEND EXTRA_LIBS ${AUDIOUNIT})
       
  1290   endif()
       
  1291   if(SDL_FRAMEWORK_AUDIOTOOLBOX)
       
  1292     find_library(AUDIOTOOLBOX AudioToolbox)
       
  1293     list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
       
  1294   endif()
  1284   endif()
  1295 
  1285 
  1296   # iOS hack needed - http://code.google.com/p/ios-cmake/ ?
  1286   # iOS hack needed - http://code.google.com/p/ios-cmake/ ?
  1297   if(SDL_VIDEO)
  1287   if(SDL_VIDEO)
  1298     CheckCOCOA()
  1288     CheckCOCOA()