From 8f68703255047b7fa2bacff9e5f9299c047f6795 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Sat, 23 Nov 2024 23:14:22 +0500 Subject: [PATCH] Link to avrt.dll on Windows for openal-soft >=1.24.0 --- src/sound/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sound/CMakeLists.txt b/src/sound/CMakeLists.txt index 9fbdd6ac1..832cdee3f 100644 --- a/src/sound/CMakeLists.txt +++ b/src/sound/CMakeLists.txt @@ -64,8 +64,14 @@ if(OPENAL) if(TARGET OpenAL::OpenAL) target_link_libraries(86Box OpenAL::OpenAL) + if(WIN32 AND STATIC_BUILD) + target_link_libraries(OpenAL::OpenAL INTERFACE avrt) + endif() else() target_link_libraries(86Box ${OPENAL_LIBRARY}) + if(WIN32 AND STATIC_BUILD) + target_link_libraries(${OPENAL_LIBRARY} INTERFACE avrt) + endif() endif() include_directories(${OPENAL_INCLUDE_DIR})