diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index 51476a6ea6..be8c58d14a 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -6,33 +6,33 @@ set(SRCS Src/AudioCommon.cpp set(LIBS "") +if(ALSA_FOUND) + set(SRCS ${SRCS} Src/AlsaSoundStream.cpp) + set(LIBS ${LIBS} ${ALSA_LIBRARIES}) +endif(ALSA_FOUND) + +if(AO_FOUND) + set(SRCS ${SRCS} Src/AOSoundStream.cpp) + set(LIBS ${LIBS} ${AO_LIBRARIES}) +endif(AO_FOUND) + +if(OPENAL_FOUND) + set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp) + set(LIBS ${LIBS} ${OPENAL_LIBRARY}) +endif(OPENAL_FOUND) + +if(PULSEAUDIO_FOUND) + set(SRCS ${SRCS} Src/PulseAudioStream.cpp) + set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES}) +endif(PULSEAUDIO_FOUND) + +if(WIN32) + set(SRCS ${SRCS} Src/DSoundStream.cpp) + set(SRCS ${SRCS} Src/XAudio2Stream.cpp) +endif(WIN32) + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(SRCS ${SRCS} Src/CoreAudioSoundStream.cpp) -else() - if(ALSA_FOUND) - set(SRCS ${SRCS} Src/AlsaSoundStream.cpp) - set(LIBS ${LIBS} ${ALSA_LIBRARIES}) - endif(ALSA_FOUND) - - if(AO_FOUND) - set(SRCS ${SRCS} Src/AOSoundStream.cpp) - set(LIBS ${LIBS} ${AO_LIBRARIES}) - endif(AO_FOUND) - - if(OPENAL_FOUND) - set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp) - set(LIBS ${LIBS} openal) - endif(OPENAL_FOUND) - - if(PULSEAUDIO_FOUND) - set(SRCS ${SRCS} Src/PulseAudioStream.cpp) - set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES}) - endif(PULSEAUDIO_FOUND) - - if(WIN32) - set(SRCS ${SRCS} Src/DSoundStream.cpp) - set(SRCS ${SRCS} Src/XAudio2Stream.cpp) - endif(WIN32) endif() add_library(audiocommon STATIC ${SRCS}) diff --git a/Source/Core/AudioCommon/Src/aldlist.cpp b/Source/Core/AudioCommon/Src/aldlist.cpp index 2008842486..69d42148ae 100644 --- a/Source/Core/AudioCommon/Src/aldlist.cpp +++ b/Source/Core/AudioCommon/Src/aldlist.cpp @@ -27,6 +27,9 @@ #ifdef _WIN32 #include "../../../../Externals/OpenAL/include/al.h" #include "../../../../Externals/OpenAL/include/alc.h" +#elif defined(__APPLE__) +#include +#include #else #include #include