Files @ r26099:9c675ef812ea
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/FindXaudio2.cmake

Michael Lutz
Change: [Network] Transfer command data as serialized byte stream without fixed structure.

The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
# Autodetect if xaudio2 can be used.

include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_FLAGS "")

check_cxx_source_compiles("
    #include <cstdio>
    #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() { printf(\"%s\\\\n\", XAUDIO2_DLL_A); return 0; }"
    XAUDIO2_FOUND
)