dolphin/Source/Core/AudioCommon/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
2.3 KiB
CMake
Raw Normal View History

add_library(audiocommon
2017-02-04 23:18:59 +00:00
AudioCommon.cpp
AudioCommon.h
AudioStretcher.cpp
AudioStretcher.h
2017-03-22 23:09:59 +00:00
CubebStream.cpp
CubebStream.h
CubebUtils.cpp
CubebUtils.h
Enums.h
2017-02-04 23:18:59 +00:00
Mixer.cpp
Mixer.h
SurroundDecoder.cpp
SurroundDecoder.h
2017-02-04 23:18:59 +00:00
NullSoundStream.cpp
NullSoundStream.h
WaveFile.cpp
WaveFile.h
2017-02-04 23:18:59 +00:00
)
2022-08-07 23:17:41 +00:00
if(ANDROID)
find_package(OpenSLES)
if(OPENSLES_FOUND)
message(STATUS "OpenSLES found, enabling OpenSLES sound backend")
target_sources(audiocommon PRIVATE
OpenSLESStream.cpp
OpenSLESStream.h
)
target_link_libraries(audiocommon PRIVATE OpenSLES::OpenSLES)
target_compile_definitions(audiocommon PRIVATE HAVE_OPENSL_ES=1)
endif()
2017-01-25 05:25:52 +00:00
endif()
2013-02-26 19:49:00 +00:00
if(ENABLE_ALSA)
find_package(ALSA)
if(ALSA_FOUND)
message(STATUS "ALSA found, enabling ALSA sound backend")
target_sources(audiocommon PRIVATE
AlsaSoundStream.cpp
AlsaSoundStream.h
)
target_link_libraries(audiocommon PRIVATE ALSA::ALSA)
target_compile_definitions(audiocommon PRIVATE HAVE_ALSA=1)
else()
message(STATUS "ALSA NOT found, disabling ALSA sound backend")
endif()
else()
message(STATUS "ALSA explicitly disabled, disabling ALSA sound backend")
2017-01-25 05:25:52 +00:00
endif()
2011-12-05 04:49:08 +00:00
if(ENABLE_PULSEAUDIO)
# PulseAudio ships with a PulseAudioConfig.cmake with no imported target
# So we use our own FindPulseAudio instead with "MODULE"
find_package(PulseAudio MODULE QUIET)
2020-09-09 03:24:34 +00:00
if(PulseAudio_FOUND)
message(STATUS "PulseAudio found, enabling PulseAudio sound backend")
target_sources(audiocommon PRIVATE
PulseAudioStream.cpp
PulseAudioStream.h
)
target_link_libraries(audiocommon PRIVATE PulseAudio::PulseAudio)
target_compile_definitions(audiocommon PRIVATE HAVE_PULSEAUDIO=1)
else()
message(STATUS "PulseAudio NOT found, disabling PulseAudio sound backend")
endif()
else()
message(STATUS "PulseAudio explicitly disabled, disabling PulseAudio sound backend")
2017-01-25 05:25:52 +00:00
endif()
2011-12-05 04:49:08 +00:00
if(WIN32)
target_sources(audiocommon PRIVATE
# Dolphin loads openal32.dll at runtime
OpenALStream.cpp
OpenALStream.h
WASAPIStream.cpp
WASAPIStream.h
)
endif()
target_link_libraries(audiocommon
PUBLIC
common
PRIVATE
cubeb::cubeb
SoundTouch
FreeSurround)
2022-05-21 23:19:44 +00:00
if(MSVC)
# Add precompiled header
target_link_libraries(audiocommon PRIVATE use_pch)
endif()