Add ESD support to CMake

pull/1/head
Timothy Pearson 13 years ago
parent b73042f8dd
commit d548013bdb

@ -34,6 +34,7 @@ option( WITH_ALSA "Enable ALSA support" ON )
option( WITH_AUDIOFILE "Enable audiofile (wav) support" ON ) option( WITH_AUDIOFILE "Enable audiofile (wav) support" ON )
option( WITH_VORBIS "Enable Ogg/Vorbis support" ON ) option( WITH_VORBIS "Enable Ogg/Vorbis support" ON )
option( WITH_MAD "Enable MAD mp3 decoder 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} ) 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( "malloc.h" HAVE_MALLOC_H )
check_include_file( "memory.h" HAVE_MEMORY_H ) check_include_file( "memory.h" HAVE_MEMORY_H )
check_include_file( "dlfcn.h" HAVE_DLFCN_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 ################ ##### check for system libraries ################
@ -147,6 +150,21 @@ if( WITH_ALSA )
endif( 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 ############ ##### check for glib/gthread modules ############
pkg_search_module( GLIB2 glib-2.0 ) pkg_search_module( GLIB2 glib-2.0 )

@ -43,6 +43,7 @@ install( PROGRAMS
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/artsc
${CMAKE_BINARY_DIR}/mcop ${CMAKE_BINARY_DIR}/mcop
${CMAKE_SOURCE_DIR}/mcop ${CMAKE_SOURCE_DIR}/mcop
${CMAKE_BINARY_DIR}/flow ${CMAKE_BINARY_DIR}/flow
@ -64,7 +65,7 @@ install( FILES
tde_add_library( artsdsp SHARED tde_add_library( artsdsp SHARED
SOURCES artsdsp.c SOURCES artsdsp.c
VERSION 0.0.0 VERSION 0.0.0
LINK artsc-shared LINK artsc-shared dl
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

@ -26,8 +26,14 @@
#cmakedefine HAVE_LIBAUDIOFILE 1 #cmakedefine HAVE_LIBAUDIOFILE 1
#cmakedefine HAVE_LIBESD 1
#cmakedefine HAVE_LIBASOUND2 1 #cmakedefine HAVE_LIBASOUND2 1
#cmakedefine HAVE_ALSA_ASOUNDLIB_H 1 #cmakedefine HAVE_ALSA_ASOUNDLIB_H 1
#cmakedefine HAVE_SND_PCM_RESUME 1 #cmakedefine HAVE_SND_PCM_RESUME 1
#cmakedefine ALSA_PCM_OLD_SW_PARAMS_API 1 #cmakedefine ALSA_PCM_OLD_SW_PARAMS_API 1
#cmakedefine ALSA_PCM_OLD_HW_PARAMS_API 1 #cmakedefine ALSA_PCM_OLD_HW_PARAMS_API 1
#cmakedefine HAVE_SYS_SOUNDCARD_H 1
#cmakedefine HAVE_LIBPTHREAD 1
#define HAVE_IOCTL_INT_ULONGINT_DOTS 3

@ -15,6 +15,7 @@ add_subdirectory( gslpp )
include_directories( include_directories(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/artsc
${CMAKE_BINARY_DIR}/mcop ${CMAKE_BINARY_DIR}/mcop
${CMAKE_SOURCE_DIR}/mcop ${CMAKE_SOURCE_DIR}/mcop
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}

@ -12,11 +12,11 @@
configure_file( arts_export.h.in arts_export.h ) configure_file( arts_export.h.in arts_export.h )
if( NOT EXTENSION_DIR ) if( NOT EXTENSION_DIR )
set( EXTENSION_DIR ${CMAKE_INSTALL_PREFIX}/lib ) set( EXTENSION_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} )
endif( NOT EXTENSION_DIR ) endif( NOT EXTENSION_DIR )
if( NOT DTRADER_DIR ) if( NOT DTRADER_DIR )
set( DTRADER_DIR ${CMAKE_INSTALL_PREFIX}/lib/mcop ) set( DTRADER_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/mcop )
endif( NOT DTRADER_DIR ) endif( NOT DTRADER_DIR )
add_definitions( add_definitions(
@ -66,6 +66,6 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED tde_add_library( ${target} SHARED
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
VERSION 1.0.0 VERSION 1.0.0
LINK ltdlc-static LINK ltdlc-static ${ESOUND_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

@ -11,6 +11,11 @@
include_directories( include_directories(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/flow
${CMAKE_BINARY_DIR}/mcop
${CMAKE_SOURCE_DIR}/flow
${CMAKE_SOURCE_DIR}/mcop
${GLIB2_INCLUDE_DIRS}
) )
@ -19,6 +24,6 @@ include_directories(
tde_add_library( mcop_mt SHARED tde_add_library( mcop_mt SHARED
SOURCES threads_posix.cc SOURCES threads_posix.cc
VERSION 1.0.0 VERSION 1.0.0
LINK artsflow-shared LINK artsflow-shared pthread
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

Loading…
Cancel
Save