build: fix faudio static linkage

Use "faudio" and dependent dlls on Windows instead of the FAudio::FAudio
cmake target, because the cmake target always links the faudio dll.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2024-05-09 01:25:05 +00:00
parent c0bcf3bfdf
commit 244149c00e
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 4 additions and 1 deletions

View File

@ -384,7 +384,10 @@ endif()
# FAudio.
if(ENABLE_FAUDIO)
target_sources(visualboyadvance-m PRIVATE audio/internal/faudio.cpp)
target_link_libraries(visualboyadvance-m FAudio::FAudio)
target_link_libraries(visualboyadvance-m faudio)
if(WIN32)
target_link_libraries(visualboyadvance-m dxguid uuid winmm ole32 advapi32 user32 mfplat mfreadwrite mfuuid propsys)
endif()
target_compile_definitions(visualboyadvance-m PRIVATE VBAM_ENABLE_FAUDIO)
endif()