summaryrefslogtreecommitdiff
path: root/cmake/FindXaudio2.cmake
blob: 065e2d35891317c5f53c4a132553cc2b5e763a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Autodetect if xaudio2 can be used.

include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_FLAGS "")

check_cxx_source_compiles("
    #include <windows.h>

    #undef NTDDI_VERSION
    #undef _WIN32_WINNT

    #define NTDDI_VERSION    NTDDI_WIN8
    #define _WIN32_WINNT     _WIN32_WINNT_WIN8

    #include <xaudio2.h>
    int main() { return 0; }"
    XAUDIO2_FOUND
)