CMakeLists.txt
changeset 12248 a65c2e471570
parent 12229 2fb171be56e0
child 12249 4f358c108da1
     1.1 --- a/CMakeLists.txt	Fri Sep 28 01:18:54 2018 -0700
     1.2 +++ b/CMakeLists.txt	Fri Sep 28 11:30:50 2018 +0300
     1.3 @@ -334,7 +334,7 @@
     1.4  endforeach()
     1.5  set_option(VIDEO_COCOA         "Use Cocoa video driver" ${APPLE})
     1.6  set_option(DIRECTX             "Use DirectX for Windows audio/video" ${WINDOWS})
     1.7 -dep_option(WASAPI              "Use the Windows WASAPI audio driver" ON "DIRECTX" OFF)
     1.8 +set_option(WASAPI              "Use the Windows WASAPI audio driver" ${WINDOWS})
     1.9  set_option(RENDER_D3D          "Enable the Direct3D render driver" ${WINDOWS})
    1.10  set_option(VIDEO_VIVANTE       "Use Vivante EGL video driver" ${UNIX_SYS})
    1.11  dep_option(VIDEO_VULKAN        "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
    1.12 @@ -1200,8 +1200,6 @@
    1.13      check_include_file(ddraw.h HAVE_DDRAW_H)
    1.14      check_include_file(dsound.h HAVE_DSOUND_H)
    1.15      check_include_file(dinput.h HAVE_DINPUT_H)
    1.16 -    check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
    1.17 -    check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
    1.18      check_include_file(dxgi.h HAVE_DXGI_H)
    1.19      if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
    1.20        set(HAVE_DIRECTX TRUE)
    1.21 @@ -1226,6 +1224,10 @@
    1.22        set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
    1.23      endif()
    1.24  
    1.25 +    # headers needed for WASAPI support:
    1.26 +    check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
    1.27 +    check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
    1.28 +
    1.29      if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
    1.30        set(SDL_AUDIO_DRIVER_WASAPI 1)
    1.31        file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)