Compile with OpenAL support on OS X.
This commit is contained in:
parent
24dcb7922c
commit
958891b4eb
|
@ -6,9 +6,6 @@ set(SRCS Src/AudioCommon.cpp
|
|||
|
||||
set(LIBS "")
|
||||
|
||||
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})
|
||||
|
@ -21,7 +18,7 @@ else()
|
|||
|
||||
if(OPENAL_FOUND)
|
||||
set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp)
|
||||
set(LIBS ${LIBS} openal)
|
||||
set(LIBS ${LIBS} ${OPENAL_LIBRARY})
|
||||
endif(OPENAL_FOUND)
|
||||
|
||||
if(PULSEAUDIO_FOUND)
|
||||
|
@ -33,6 +30,9 @@ else()
|
|||
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)
|
||||
endif()
|
||||
|
||||
add_library(audiocommon STATIC ${SRCS})
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
#ifdef _WIN32
|
||||
#include "../../../../Externals/OpenAL/include/al.h"
|
||||
#include "../../../../Externals/OpenAL/include/alc.h"
|
||||
#elif defined(__APPLE__)
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
|
|
Loading…
Reference in New Issue