diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index 5cef5a9a..596f60b0 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -384,9 +384,13 @@ endif() # FAudio. if(ENABLE_FAUDIO) target_sources(visualboyadvance-m PRIVATE audio/internal/faudio.cpp) - target_link_libraries(visualboyadvance-m faudio) - if(WIN32) - target_link_libraries(visualboyadvance-m dxguid uuid winmm ole32 advapi32 user32 mfplat mfreadwrite mfuuid propsys) + if(MSVC) + target_link_libraries(visualboyadvance-m FAudio::FAudio) + else() + target_link_libraries(visualboyadvance-m FAudio) + if(WIN32) + target_link_libraries(visualboyadvance-m dxguid uuid winmm ole32 advapi32 user32 mfplat mfreadwrite mfuuid propsys) + endif() endif() target_compile_definitions(visualboyadvance-m PRIVATE VBAM_ENABLE_FAUDIO) endif()