summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2019-05-31 14:03:12 +0200
committerGitHub <noreply@github.com>2019-05-31 14:03:12 +0200
commiteed4fcc218beeae5a4e87790dfba2e3179cabe20 (patch)
tree231d47e94ff79fa65363907963e6a422d58fa670 /Source/Core/AudioCommon
parent2cb59ab055261efd29aaab94edd93a908a9ad835 (diff)
parent3d27439d9a83c643aa7ec7c50949f5c1fbf80262 (diff)
Merge pull request #8135 from lioncash/cmake
CMakeLists: Specify header files in target sources
Diffstat (limited to 'Source/Core/AudioCommon')
-rw-r--r--Source/Core/AudioCommon/CMakeLists.txt43
1 files changed, 34 insertions, 9 deletions
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
+
+ WASAPIStream.cpp
+ WASAPIStream.h
+ XAudio2Stream.cpp
+ XAudio2Stream.h
+ )
- add_library(audiocommon_xaudio27 "XAudio2_7Stream.cpp")
+ 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)