CMakeLists.txt
changeset 12249 4f358c108da1
parent 12248 a65c2e471570
child 12257 d7a3aac08fc1
equal deleted inserted replaced
12248:a65c2e471570 12249:4f358c108da1
  1210       endif()
  1210       endif()
  1211     endif()
  1211     endif()
  1212     set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
  1212     set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
  1213   endif()
  1213   endif()
  1214 
  1214 
       
  1215   # headers needed elsewhere ...
       
  1216   check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
       
  1217   check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
       
  1218   check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
       
  1219 
  1215   if(SDL_AUDIO)
  1220   if(SDL_AUDIO)
  1216     set(SDL_AUDIO_DRIVER_WINMM 1)
  1221     set(SDL_AUDIO_DRIVER_WINMM 1)
  1217     file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
  1222     file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
  1218     set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
  1223     set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
  1219     set(HAVE_SDL_AUDIO TRUE)
  1224     set(HAVE_SDL_AUDIO TRUE)
  1221     if(HAVE_DSOUND_H)
  1226     if(HAVE_DSOUND_H)
  1222       set(SDL_AUDIO_DRIVER_DSOUND 1)
  1227       set(SDL_AUDIO_DRIVER_DSOUND 1)
  1223       file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c)
  1228       file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c)
  1224       set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
  1229       set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
  1225     endif()
  1230     endif()
  1226 
       
  1227     # headers needed for WASAPI support:
       
  1228     check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
       
  1229     check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
       
  1230 
  1231 
  1231     if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
  1232     if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
  1232       set(SDL_AUDIO_DRIVER_WASAPI 1)
  1233       set(SDL_AUDIO_DRIVER_WASAPI 1)
  1233       file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
  1234       file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
  1234       set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
  1235       set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})