From d548013bdb885cac474191d0efdda85685417f08 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 12 Jan 2012 17:27:54 -0600 Subject: Add ESD support to CMake --- CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1008340..44d83d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ option( WITH_ALSA "Enable ALSA support" ON ) option( WITH_AUDIOFILE "Enable audiofile (wav) support" ON ) option( WITH_VORBIS "Enable Ogg/Vorbis support" ON ) option( WITH_MAD "Enable MAD mp3 decoder support" ON ) +option( WITH_ESOUND "Enable ESOUND support" ${WITH_ALL_OPTIONS} ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) @@ -60,6 +61,8 @@ check_include_file( "ctype.h" HAVE_CTYPE_H ) check_include_file( "malloc.h" HAVE_MALLOC_H ) check_include_file( "memory.h" HAVE_MEMORY_H ) check_include_file( "dlfcn.h" HAVE_DLFCN_H ) +check_include_file( "sys/soundcard.h" HAVE_SYS_SOUNDCARD_H ) +check_include_file( "pthread.h" HAVE_LIBPTHREAD ) ##### check for system libraries ################ @@ -147,6 +150,21 @@ if( WITH_ALSA ) endif( WITH_ALSA ) +##### check for esound ####################### + +set( HAVE_LIBESD 0 ) +if( WITH_ESOUND ) + + pkg_search_module( ESOUND esound ) + if( ESOUND_FOUND ) + set( HAVE_LIBESD 1 ) + else( ESOUND_FOUND ) + message(FATAL_ERROR "\nESOUND support is requested, but `libesd` not found" ) + endif( ESOUND_FOUND ) + +endif( WITH_ESOUND ) + + ##### check for glib/gthread modules ############ pkg_search_module( GLIB2 glib-2.0 ) -- cgit v1.2.1