diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index 8d58daab72..aa8d78a10a 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -1,18 +1,29 @@ add_library(audiocommon AudioCommon.cpp + AudioCommon.h AudioStretcher.cpp + AudioStretcher.h CubebStream.cpp + CubebStream.h CubebUtils.cpp + CubebUtils.h Mixer.cpp + Mixer.h SurroundDecoder.cpp + SurroundDecoder.h NullSoundStream.cpp + NullSoundStream.h WaveFile.cpp + WaveFile.h ) find_package(OpenSLES) if(OPENSLES_FOUND) message(STATUS "OpenSLES found, enabling OpenSLES sound backend") - target_sources(audiocommon PRIVATE OpenSLESStream.cpp) + target_sources(audiocommon PRIVATE + OpenSLESStream.cpp + OpenSLESStream.h + ) target_link_libraries(audiocommon PRIVATE OpenSLES::OpenSLES) endif() @@ -20,7 +31,10 @@ if(ENABLE_ALSA) find_package(ALSA) if(ALSA_FOUND) message(STATUS "ALSA found, enabling ALSA sound backend") - target_sources(audiocommon PRIVATE AlsaSoundStream.cpp) + target_sources(audiocommon PRIVATE + AlsaSoundStream.cpp + AlsaSoundStream.h + ) target_link_libraries(audiocommon PRIVATE ALSA::ALSA) target_compile_definitions(audiocommon PRIVATE HAVE_ALSA=1) else() @@ -36,7 +50,10 @@ if(ENABLE_PULSEAUDIO) find_package(PulseAudio MODULE QUIET) if(PULSEAUDIO_FOUND) message(STATUS "PulseAudio found, enabling PulseAudio sound backend") - target_sources(audiocommon PRIVATE PulseAudioStream.cpp) + target_sources(audiocommon PRIVATE + PulseAudioStream.cpp + PulseAudioStream.h + ) target_link_libraries(audiocommon PRIVATE PulseAudio::PulseAudio) target_compile_definitions(audiocommon PRIVATE HAVE_PULSEAUDIO=1) else() @@ -47,18 +64,26 @@ else() endif() if(WIN32) - target_sources(audiocommon PRIVATE WASAPIStream.cpp) - target_sources(audiocommon PRIVATE XAudio2Stream.cpp) + target_sources(audiocommon PRIVATE + # Dolphin loads openal32.dll at runtime + OpenALStream.cpp + OpenALStream.h - add_library(audiocommon_xaudio27 "XAudio2_7Stream.cpp") + WASAPIStream.cpp + WASAPIStream.h + XAudio2Stream.cpp + XAudio2Stream.h + ) + + add_library(audiocommon_xaudio27 + XAudio2_7Stream.cpp + XAudio2_7Stream.h + ) target_include_directories(audiocommon_xaudio27 PRIVATE ${PROJECT_SOURCE_DIR}/Externals ${PROJECT_SOURCE_DIR}/Externals/XAudio2_7 ) target_link_libraries(audiocommon PRIVATE audiocommon_xaudio27) - - # Dolphin loads openal32.dll at runtime - target_sources(audiocommon PRIVATE OpenALStream.cpp) endif() target_link_libraries(audiocommon PRIVATE cubeb SoundTouch FreeSurround)