fix HAVE_SDL_AUDIO flag of CMakeLists.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6bcf5ac..65bc39d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1607,16 +1607,17 @@ elseif(WINDOWS)
if(SDL_AUDIO)
if(NOT WINDOWS_STORE)
- set(SDL_AUDIO_DRIVER_WINMM 1)
- file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
- set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
+ set(SDL_AUDIO_DRIVER_WINMM 1)
+ file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
+ set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
+ set(HAVE_SDL_AUDIO TRUE)
endif()
- set(HAVE_SDL_AUDIO TRUE)
if(HAVE_DSOUND_H AND NOT WINDOWS_STORE)
set(SDL_AUDIO_DRIVER_DSOUND 1)
file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
+ set(HAVE_SDL_AUDIO TRUE)
endif()
if(SDL_WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
@@ -1627,6 +1628,7 @@ elseif(WINDOWS)
list(APPEND WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/SDL_wasapi_winrt.cpp)
endif()
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
+ set(HAVE_SDL_AUDIO TRUE)
endif()
endif()
@@ -1643,8 +1645,8 @@ elseif(WINDOWS)
${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp
)
else()
- set(SDL_VIDEO_DRIVER_WINDOWS 1)
- file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
+ set(SDL_VIDEO_DRIVER_WINDOWS 1)
+ file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
endif()
set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES})