CMake: Enable WASAPI on WinRT

WASAPI backend on WinRT was implemented with 2.0.8
351d6d4784
but CMake source here was written for 2.0.7 in vcpkg
e6c65b93b1
This commit is contained in:
okuoku 2021-04-03 22:21:35 +09:00 committed by Ryan C. Gordon
parent 8fa2ce5601
commit 7b8c750954

View file

@ -1505,9 +1505,12 @@ elseif(WINDOWS)
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
endif()
if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE)
if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
set(SDL_AUDIO_DRIVER_WASAPI 1)
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
if(WINDOWS_STORE)
list(APPEND WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/SDL_wasapi_winrt.cpp)
endif()
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
endif()
endif()