From bf3bdb7367e478944dce6b09e68ed6352db6ca40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Mon, 7 Feb 2022 22:48:07 +0100 Subject: [PATCH] Work around MinGW's weird OpenAL config --- src/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c5728721b..53a38a006 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,7 +88,14 @@ if(APPLE) endif() if(OPENAL) - find_package(OpenAL REQUIRED) + if(VCPKG_TOOLCHAIN) + find_package(OpenAL CONFIG REQUIRED) + elseif(MINGW) + find_package(OpenAL MODULE REQUIRED) + else() + find_package(OpenAL REQUIRED) + endif() + if(TARGET OpenAL::OpenAL) target_link_libraries(86Box OpenAL::OpenAL) else()