Fix some linkage issues with the cmake build system.

Also X11 is required on *nix systems.
GTK2 is required for building the wxWidgets builds on *nix systems.
Added a check for pulseaudio.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6334 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-11-03 04:13:36 +00:00
parent 95d9cb3a0f
commit 381f92b151
2 changed files with 36 additions and 15 deletions

View File

@ -4,24 +4,29 @@ set(SRCS Src/AudioCommon.cpp
Src/WaveFile.cpp
Src/NullSoundStream.cpp)
set(LIBS "")
if(APPLE)
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 OR WIN32)
set(SRCS ${SRCS} Src/OpenALSoundStream.cpp)
set(SRCS ${SRCS} Src/OpenALStream.cpp)
set(LIBS ${LIBS} ${OPENAL_LIBRARIES})
endif(OPENAL_FOUND OR WIN32)
if(PULSEAUDIO_FOUND)
set(SRCS ${SRCS} Src/PulseAudioStream.cpp)
set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES})
endif(PULSEAUDIO_FOUND)
if(WIN32)
@ -30,3 +35,4 @@ else()
endif()
add_library(audiocommon STATIC ${SRCS})
target_link_libraries(audiocommon ${LIBS})