build: fix faudio linkage regression on MSVC+vcpkg

Followup on 244149c0 (build: fix faudio static linkage, 2024-05-09)
which broke linking faudio on MSVC+vcpkg, go back to using the
FAudio::FAudio cmake target for MSVC.

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

View File

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