summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2020-11-25 23:37:21 +0000
committerCharles Pigott <charlespigott@googlemail.com>2020-11-26 19:06:03 +0000
commit0a9aed052295a98f1c1438cf1fa05b9a7e6b6607 (patch)
tree576be38146030fa03ea2af014d59f66c8920b288 /cmake
parentb8ec88f6afcceb01cc8ce10ae3d91a986923baff (diff)
downloadopenttd-0a9aed052295a98f1c1438cf1fa05b9a7e6b6607.tar.xz
Fix: [CMake] Don't detect XAudio2 if defines are missing
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindXaudio2.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/FindXaudio2.cmake b/cmake/FindXaudio2.cmake
index 065e2d358..477dfea72 100644
--- a/cmake/FindXaudio2.cmake
+++ b/cmake/FindXaudio2.cmake
@@ -4,6 +4,7 @@ include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_FLAGS "")
check_cxx_source_compiles("
+ #include <cstdio>
#include <windows.h>
#undef NTDDI_VERSION
@@ -13,6 +14,6 @@ check_cxx_source_compiles("
#define _WIN32_WINNT _WIN32_WINNT_WIN8
#include <xaudio2.h>
- int main() { return 0; }"
+ int main() { printf(\"%s\\\\n\", XAUDIO2_DLL_A); return 0; }"
XAUDIO2_FOUND
)