2010-11-01 15:47:02 +00:00
|
|
|
set(SRCS Src/AudioCommon.cpp
|
|
|
|
Src/AudioCommonConfig.cpp
|
|
|
|
Src/Mixer.cpp
|
2010-11-02 00:39:52 +00:00
|
|
|
Src/WaveFile.cpp
|
2010-11-02 03:35:44 +00:00
|
|
|
Src/NullSoundStream.cpp)
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2010-11-03 04:13:36 +00:00
|
|
|
set(LIBS "")
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2010-11-17 01:03:39 +00:00
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2010-11-01 15:47:02 +00:00
|
|
|
set(SRCS ${SRCS} Src/CoreAudioSoundStream.cpp)
|
|
|
|
else()
|
|
|
|
if(ALSA_FOUND)
|
|
|
|
set(SRCS ${SRCS} Src/AlsaSoundStream.cpp)
|
2010-11-03 04:13:36 +00:00
|
|
|
set(LIBS ${LIBS} ${ALSA_LIBRARIES})
|
2010-11-01 15:47:02 +00:00
|
|
|
endif(ALSA_FOUND)
|
|
|
|
|
|
|
|
if(AO_FOUND)
|
|
|
|
set(SRCS ${SRCS} Src/AOSoundStream.cpp)
|
2010-11-03 04:13:36 +00:00
|
|
|
set(LIBS ${LIBS} ${AO_LIBRARIES})
|
2010-11-01 15:47:02 +00:00
|
|
|
endif(AO_FOUND)
|
|
|
|
|
|
|
|
if(OPENAL_FOUND OR WIN32)
|
2010-11-04 02:01:07 +00:00
|
|
|
set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp)
|
|
|
|
set(LIBS ${LIBS} openal)
|
2010-11-01 15:47:02 +00:00
|
|
|
endif(OPENAL_FOUND OR WIN32)
|
|
|
|
|
|
|
|
if(PULSEAUDIO_FOUND)
|
|
|
|
set(SRCS ${SRCS} Src/PulseAudioStream.cpp)
|
2010-11-03 04:13:36 +00:00
|
|
|
set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES})
|
2010-11-01 15:47:02 +00:00
|
|
|
endif(PULSEAUDIO_FOUND)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(SRCS ${SRCS} Src/DSoundStream.cpp)
|
2010-11-14 06:02:44 +00:00
|
|
|
set(SRCS ${SRCS} Src/XAudio2Stream.cpp)
|
2010-11-01 15:47:02 +00:00
|
|
|
endif(WIN32)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(audiocommon STATIC ${SRCS})
|
2010-11-03 04:13:36 +00:00
|
|
|
target_link_libraries(audiocommon ${LIBS})
|