diff options
Diffstat (limited to 'cmake/FindXaudio2.cmake')
-rw-r--r-- | cmake/FindXaudio2.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/FindXaudio2.cmake b/cmake/FindXaudio2.cmake new file mode 100644 index 000000000..065e2d358 --- /dev/null +++ b/cmake/FindXaudio2.cmake @@ -0,0 +1,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 +) |