summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt213
-rw-r--r--arts.pc.cmake10
-rw-r--r--artsc/CMakeLists.txt103
-rw-r--r--config.h.cmake29
-rw-r--r--flow/CMakeLists.txt124
-rw-r--r--flow/gsl/CMakeLists.txt161
-rw-r--r--flow/gslpp/CMakeLists.txt24
-rw-r--r--flow/mcopclass/CMakeLists.txt0
-rw-r--r--gmcop/CMakeLists.txt34
-rw-r--r--mcop/CMakeLists.txt123
-rw-r--r--mcop_mt/CMakeLists.txt18
-rw-r--r--mcopidl/CMakeLists.txt34
-rw-r--r--qtmcop/CMakeLists.txt50
-rw-r--r--soundserver/CMakeLists.txt200
14 files changed, 1123 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..8873729
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,213 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 2.6 )
+
+
+##### project settings ##########################
+
+project( arts )
+
+set( ARTS_MAJOR_VERSION 1 )
+set( ARTS_MINOR_VERSION 5 )
+set( ARTS_MICRO_VERSION 10 )
+set( ARTS_VERSION "${ARTS_MAJOR_VERSION}.${ARTS_MINOR_VERSION}.${ARTS_MICRO_VERSION}" )
+
+
+##### user requested options ####################
+
+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 )
+
+
+##### paths setup ###############################
+
+if( NOT BIN_INSTALL_DIR )
+ set( BIN_INSTALL_DIR bin )
+endif ( NOT BIN_INSTALL_DIR )
+
+if( NOT LIB_INSTALL_DIR )
+ set( LIB_INSTALL_DIR lib )
+endif( NOT LIB_INSTALL_DIR )
+
+if( NOT INCLUDE_INSTALL_DIR )
+ set( INCLUDE_INSTALL_DIR include/${CMAKE_PROJECT_NAME} )
+endif( NOT INCLUDE_INSTALL_DIR )
+
+if( NOT PKGCONFIG_INSTALL_DIR )
+ set( PKGCONFIG_INSTALL_DIR lib/pkgconfig )
+endif( NOT PKGCONFIG_INSTALL_DIR )
+
+
+##### check for include files ###################
+
+include( CheckIncludeFile )
+
+check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
+check_include_file( "time.h" TIME_WITH_SYS_TIME )
+check_include_file( "stdio.h" HAVE_STDIO_H )
+check_include_file( "stdlib.h" HAVE_STDLIB_H )
+check_include_file( "string.h" HAVE_STRING_H )
+check_include_file( "strings.h" HAVE_STRINGS_H )
+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 for system libraries ################
+
+include( CheckLibraryExists )
+
+set( DL_LIBRARIES dl )
+check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL )
+if( NOT HAVE_LIBDL )
+ unset( DL_LIBRARIES )
+endif( NOT HAVE_LIBDL )
+
+find_package( Threads )
+
+##### check for functions #######################
+
+include( CheckFunctionExists )
+
+set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
+set( CMAKE_REQUIRED_LIBRARIES dl )
+check_function_exists( dlerror HAVE_DLERROR )
+check_function_exists( strcmp HAVE_STRCMP )
+check_function_exists( strchr HAVE_STRCHR )
+check_function_exists( index HAVE_INDEX )
+check_function_exists( strrchr HAVE_STRRCHR )
+check_function_exists( rindex HAVE_RINDEX )
+check_function_exists( memcpy HAVE_MEMCPY )
+check_function_exists( bcopy HAVE_BCOPY )
+set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
+unset( bak_CMAKE_REQUIRED_LIBRARIES )
+
+
+##### check for modules #########################
+
+include( FindPkgConfig )
+
+
+##### check for audiofile #######################
+
+set( HAVE_LIBAUDIOFILE 0 )
+if( WITH_AUDIOFILE )
+
+ pkg_search_module( AUDIOFILE audiofile )
+ if( AUDIOFILE_FOUND )
+ set( HAVE_LIBAUDIOFILE 1 )
+ else( AUDIOFILE_FOUND )
+ message(FATAL_ERROR "\naudiofile (wav) support are requested, but `libaudiofile` not found" )
+ endif( AUDIOFILE_FOUND )
+
+endif( WITH_AUDIOFILE )
+
+
+##### check for alsa ############################
+
+set( HAVE_LIBASOUND2 0 )
+if( WITH_ALSA )
+
+ find_package( ALSA )
+
+ if( ALSA_FOUND )
+
+ # there is support only for ALSA 1.x
+
+ set( HAVE_LIBASOUND2 1 )
+ set( ALSA_PCM_OLD_SW_PARAMS_API 1 )
+ set( ALSA_PCM_OLD_HW_PARAMS_API 1 )
+
+ check_include_file( "alsa/asoundlib.h" HAVE_ALSA_ASOUNDLIB_H )
+ if( NOT HAVE_ALSA_ASOUNDLIB_H )
+ check_include_file( "sys/asoundlib.h" HAVE_SYS_ASOUNDLIB_H )
+ endif( NOT HAVE_ALSA_ASOUNDLIB_H )
+
+ set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
+ set( CMAKE_REQUIRED_LIBRARIES ${ALSA_LIBRARIES} )
+ check_function_exists( snd_pcm_resume HAVE_SND_PCM_RESUME )
+ set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
+ unset( bak_CMAKE_REQUIRED_LIBRARIES )
+
+ else( ALSA_FOUND )
+
+ message(FATAL_ERROR "\nALSA support are requested, but not found on your system" )
+
+ endif( ALSA_FOUND )
+
+endif( WITH_ALSA )
+
+
+##### check for glib/gthread modules ############
+
+pkg_search_module( GLIB2 glib-2.0 )
+
+if( GLIB2_FOUND )
+ pkg_search_module( GTHREAD2 gthread-2.0 )
+ if( NOT GTHREAD2_FOUND )
+ message(FATAL_ERROR "\ngthread-2.0 are required, but not found on your system" )
+ endif( NOT GTHREAD2_FOUND )
+else( GLIB2_FOUND )
+ message(FATAL_ERROR "\nglib-2.0 are required, but not found on your system" )
+endif( GLIB2_FOUND )
+
+
+##### check for Qt3 #############################
+
+find_package( Qt3 )
+if( NOT QT_FOUND )
+ message(FATAL_ERROR "\nQt3 are required, but not found on your system" )
+endif( NOT QT_FOUND )
+
+
+##### check for TQt #############################
+
+pkg_search_module( TQT TQt )
+if( NOT TQT_FOUND )
+ message(FATAL_ERROR "\nTQt are required, but not found on your system" )
+endif( NOT TQT_FOUND )
+
+
+##### write config.h file #######################
+
+configure_file( config.h.cmake config.h @ONLY )
+
+
+##### write pkgconfig file ######################
+
+configure_file( arts.pc.cmake arts.pc @ONLY )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/arts.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
+
+
+##### global compiler settings ##################
+
+add_definitions(
+ -DHAVE_CONFIG_H
+)
+
+set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
+
+
+##### project subdirectories ####################
+
+add_subdirectory( libltdl )
+add_subdirectory( mcop )
+add_subdirectory( mcopidl )
+add_subdirectory( flow )
+add_subdirectory( mcop_mt )
+add_subdirectory( soundserver )
+add_subdirectory( artsc )
+add_subdirectory( gmcop )
+add_subdirectory( qtmcop )
diff --git a/arts.pc.cmake b/arts.pc.cmake
new file mode 100644
index 0000000..74f16d1
--- /dev/null
+++ b/arts.pc.cmake
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@LIB_INSTALL_DIR@
+includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+
+Name: arts
+Description: Soundserver for the K Desktop Environment (KDE)
+Version: @ARTS_VERSION@
+Libs: -L${libdir}
+Cflags: -I${includedir}
diff --git a/artsc/CMakeLists.txt b/artsc/CMakeLists.txt
new file mode 100644
index 0000000..c8659c3
--- /dev/null
+++ b/artsc/CMakeLists.txt
@@ -0,0 +1,103 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+##### variables for artsc-config ################
+
+set( prefix ${CMAKE_INSTALL_PREFIX} )
+set( exec_prefix $prefix )
+set( libdir $prefix/${LIB_INSTALL_DIR} )
+set( includedir ${prefix}/${INCLUDE_INSTALL_DIR} )
+set( LIBDL -l${DL_LIBRARIES} )
+set( USE_THREADS )
+set( LIBPTHREAD ${CMAKE_THREAD_LIBS_INIT} )
+foreach( LIB ${GTHREAD2_LIBRARIES} )
+ set( GLIB_LDFLAGS "${GLIB_LDFLAGS} -l${LIB}" )
+endforeach(LIB)
+set( GLIB_LIBADD )
+foreach( INC ${GTHREAD2_INCLUDE_DIRS} )
+ set( GLIB_CFLAGS "${GLIB_CFLAGS} -I${INC}" )
+endforeach(INC)
+
+configure_file( artsc-config.in artsc-config @ONLY )
+configure_file( artsc_export.h.in artsc_export.h @ONLY )
+
+set( FLOWLIBS artsflow )
+
+set( artsc_INCS
+ artsc.h
+ artsc_export.h
+)
+
+add_definitions(
+ -DCOMPILING_ARTSC
+)
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR} # for artsc_export.h
+ ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
+ ${CMAKE_SOURCE_DIR}/mcop # for common.h
+ ${CMAKE_BINARY_DIR}/flow # for artsflow.h
+ ${CMAKE_SOURCE_DIR}/flow # for stdsynthmodule.h
+ ${CMAKE_BINARY_DIR}/soundserver # for soundserver.h
+)
+
+##### libartsdsp ################################
+
+set( artsdsp_SRCS
+ artsdsp.c
+)
+
+add_library( artsdsp SHARED ${artsdsp_SRCS} )
+set_target_properties( artsdsp PROPERTIES VERSION 0.0 SOVERSION 0 )
+target_link_libraries( artsdsp artsc )
+
+
+##### libartsdsp_st #############################
+
+set( artsdsp_st_SRCS
+ artsc.c
+ artsdsp.c
+)
+
+add_library( artsdsp_st SHARED ${artsdsp_st_SRCS} )
+set_target_properties( artsdsp_st PROPERTIES VERSION 0.0 SOVERSION 0 )
+set_target_properties( artsdsp_st PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
+target_link_libraries( artsdsp_st ltdlc )
+
+
+##### libartsc ##################################
+
+set( artsc_SRCS
+ artsc.c
+)
+
+add_library( artsc SHARED ${artsc_SRCS} )
+set_target_properties( artsc PROPERTIES VERSION 0.0 SOVERSION 0 )
+set_target_properties( artsc PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
+target_link_libraries( artsc ltdlc ${LIBPTHREAD} )
+
+
+##### libartscbackend ###########################
+
+set( artscbackend_SRCS
+ artscbackend.cc
+)
+
+add_library( artscbackend SHARED ${artscbackend_SRCS} )
+set_target_properties( artscbackend PROPERTIES VERSION 0.0 SOVERSION 0 )
+target_link_libraries( artscbackend ${FLOWLIBS} soundserver_idl )
+
+
+##### install ###################################
+
+#install( FILES ${artsc_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
+install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/artsc-config DESTINATION ${BIN_INSTALL_DIR} )
+install( TARGETS artsdsp artsdsp_st artsc artscbackend LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..e9822bf
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,29 @@
+#cmakedefine HAVE_SYS_TIME_H 1
+#cmakedefine TIME_WITH_SYS_TIME 1
+#cmakedefine HAVE_STDIO_H 1
+#cmakedefine HAVE_STDLIB_H 1
+#cmakedefine HAVE_STRING_H 1
+#cmakedefine HAVE_STRINGS_H 1
+#cmakedefine HAVE_CTYPE_H 1
+#cmakedefine HAVE_MALLOC_H 1
+#cmakedefine HAVE_MEMORY_H 1
+#cmakedefine HAVE_DLFCN_H 1
+
+#cmakedefine HAVE_LIBDL 1
+
+#cmakedefine HAVE_DLERROR 1
+#cmakedefine HAVE_STRCMP 1
+#cmakedefine HAVE_STRCHR 1
+#cmakedefine HAVE_INDEX 1
+#cmakedefine HAVE_STRRCHR 1
+#cmakedefine HAVE_RINDEX 1
+#cmakedefine HAVE_MEMCPY 1
+#cmakedefine HAVE_BCOPY 1
+
+#cmakedefine HAVE_LIBAUDIOFILE 1
+
+#cmakedefine HAVE_LIBASOUND2 1
+#cmakedefine HAVE_ALSA_ASOUNDLIB_H 1
+#cmakedefine HAVE_SND_PCM_RESUME 1
+#cmakedefine ALSA_PCM_OLD_SW_PARAMS_API 1
+#cmakedefine ALSA_PCM_OLD_HW_PARAMS_API 1
diff --git a/flow/CMakeLists.txt b/flow/CMakeLists.txt
new file mode 100644
index 0000000..2f7325c
--- /dev/null
+++ b/flow/CMakeLists.txt
@@ -0,0 +1,124 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( mcopclass )
+add_subdirectory( gsl )
+add_subdirectory( gslpp )
+
+set( artsflow_INCS
+ ${CMAKE_CURRENT_BINARY_DIR}/artsflow.h
+ audiosubsys.h
+ cache.h
+ cachedwav.h
+ convert.h
+ pipebuffer.h
+ stdsynthmodule.h
+ synthschedule.h
+ fft.h
+ artsflow.idl
+ audioio.h
+ resample.h
+ cpuinfo.h
+ bufferqueue.h
+ gslschedule.h
+)
+
+set( artsflow_SRCS
+ synth_play_impl.cc
+ gslschedule.cc
+ audiosubsys.cc
+ pipebuffer.cc
+ convert.cc
+ synth_wave_sin_impl.cc
+ synth_frequency_impl.cc
+ synth_multi_add_impl.cc
+ synth_add_impl.cc
+ synth_mul_impl.cc
+ synth_play_wav_impl.cc
+ stdsynthmodule.cc
+ cache.cc
+ asyncschedule.cc
+ bytestreamtoaudio_impl.cc
+ stereovolumecontrol_impl.cc
+ stereoeffectstack_impl.cc
+ fft.c
+ stereofftscope_impl.cc
+ virtualports.cc
+ bus.cc
+ audiomanager_impl.cc
+ synth_record_impl.cc
+ resample.cc
+ audioio.cc
+ audioiooss.cc
+ audioioalsa.cc
+ audioioalsa9.cc
+ audioionull.cc
+ audioiolibaudioio.cc
+ audioioesd.cc
+ audioiojack.cc
+ audioiosun.cc
+ audioioaix.cc
+ audioionas.cc
+ cpuinfo.cc
+ audioioossthreaded.cc
+ audiotobytestream_impl.cc
+ audioiosgi.cc
+ audioiocsl.cc
+ audioiomas.cc
+ datahandle_impl.cc
+)
+
+include_directories(
+ ${CMAKE_BINARY_DIR} # for config.h
+ ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
+ ${CMAKE_SOURCE_DIR}/mcop # for common.h
+ ${CMAKE_CURRENT_BINARY_DIR} # for gsl/gslconfig.h
+ ${CMAKE_CURRENT_SOURCE_DIR} # for gsl/gsldefs.h
+ ${GLIB2_INCLUDE_DIRS} # for glib.h
+)
+
+add_definitions(
+ -DHAVE_CONFIG_H
+)
+
+##### artsflow_idl
+
+add_custom_command(
+ OUTPUT artsflow.cc
+ COMMAND ../mcopidl/mcopidl
+ ARGS -t ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl
+)
+
+set( artsflow_idl_SRCS artsflow.cc )
+add_library( artsflow_idl SHARED ${artsflow_idl_SRCS} )
+set_target_properties( artsflow_idl PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( artsflow_idl mcop ${ALSA_LIBRARY} )
+add_dependencies( artsflow_idl mcopidl )
+
+##### artsflow
+
+add_library( artsflow SHARED ${artsflow_SRCS} )
+set_target_properties( artsflow PROPERTIES VERSION 1.0 SOVERSION 1 )
+
+target_link_libraries( artsflow
+ artsflow_idl
+ mcop
+ gslpp
+ gsl
+ ${AUDIOFILE_LIBRARIES}
+)
+
+
+
+##### install ###################################
+
+install( FILES ${artsflow_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
+install( TARGETS artsflow_idl artsflow LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file
diff --git a/flow/gsl/CMakeLists.txt b/flow/gsl/CMakeLists.txt
new file mode 100644
index 0000000..36ee59c
--- /dev/null
+++ b/flow/gsl/CMakeLists.txt
@@ -0,0 +1,161 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+##### check for ogg/vorbis ######################
+
+set( GSL_HAVE_OGGVORBIS 0 )
+if( WITH_VORBIS )
+
+ pkg_search_module( VORBIS vorbis )
+
+ if( VORBIS_FOUND )
+
+ pkg_search_module( VORBISFILE vorbisfile )
+
+ if( VORBISFILE_FOUND )
+
+ set( GSL_HAVE_OGGVORBIS 1 )
+
+ try_compile(
+ GSL_HAVE_OGGVORBIS_RC3
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/check_for_ov_read_float.c
+ CMAKE_FLAGS "-DLINK_LIBRARIES=${VORBISFILE_LIBRARIES}"
+ )
+ else( VORBISFILE_FOUND )
+
+ message(FATAL_ERROR "\nOgg/Vorbis support are requested, but `libvorbisfile` not found" )
+
+ endif( VORBISFILE_FOUND )
+
+ else( VORBIS_FOUND )
+
+ message(FATAL_ERROR "\nOgg/Vorbis support are requested, but `libvorbis` but found" )
+
+ endif( VORBIS_FOUND )
+
+endif( WITH_VORBIS )
+
+
+##### check for libmad MPEG decoder #############
+
+set( GSL_HAVE_LIBMAD 0 )
+if( WITH_MAD )
+
+ pkg_search_module( MAD mad )
+
+ if( MAD_FOUND )
+ set( GSL_HAVE_LIBMAD 1 )
+ else( MAD_FOUND )
+ message(FATAL_ERROR "\nMAD support are requested, but `libmad` not found" )
+ endif( MAD_FOUND )
+
+endif( WITH_MAD )
+
+
+##### check for some type sizes #################
+
+include( CheckTypeSize )
+
+check_type_size( pthread_mutex_t GSL_SIZEOF_PTH_MUTEX_T )
+check_type_size( pthread_cond_t GSL_SIZEOF_PTH_COND_T )
+check_type_size( intmax_t GSL_SIZEOF_STD_INTMAX_T )
+
+try_compile(
+ GSL_HAVE_MUTEXATTR_SETTYPE
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/check_for_pthread_mutexattr_settype.c
+ CMAKE_FLAGS "-DLINK_LIBRARIES=${CMAKE_THREAD_LIBS_INIT}"
+)
+
+set( GSL_USE_GSL_GLIB 1 )
+set( GSL_USE_ARTS_THREADS 1 )
+
+
+##### write configuration #######################
+
+configure_file( gslconfig.h.in gslconfig.h )
+
+
+##### compile ###################################
+
+set( gsl_INCS
+ ${CMAKE_CURRENT_BINARY_DIR}/gslconfig.h
+ gslcommon.h
+ gsldatacache.h
+ gsldatahandle.h
+ gsldefs.h
+ gslloader.h
+ gslmath.h
+ gslfilter.h
+ gsldatautils.h
+ gsldatahandle-vorbis.h
+ gslconvert.h
+ gslfft.h
+ gslieee754.h
+ gslsignal.h
+ gslmagic.h
+ gslengine.h
+ gslwaveosc.h
+ gslwavechunk.h
+ gsldatahandle-mad.h
+ gslosctable.h
+ gsloscillator.h
+)
+
+set( gsl_SRCS
+ gsldatacache.c
+ gsldatahandle.c
+ gslwavechunk.c
+ gsldatahandle-vorbis.c
+ gslmath.c
+ gslfilter.c
+ gslcommon.c
+ gsldatautils.c
+ gslmagic.c
+ gslloader-wav.c
+ gslloader-gslwave.c
+ gslloader-mad.c
+ gslloader-oggvorbis.c
+ gslconvert.c
+ gslfft.c
+ gslsignal.c
+ gslloader.c
+ gslwaveosc.c
+ gslengine.c
+ gsloputil.c
+ gslopmaster.c
+ gslopschedule.c
+ gsldatahandle-mad.c
+ gslosctable.c
+ gsloscillator.c
+ gslfilehash.c
+ gslartsthreads.cc
+)
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/mcop
+ ${CMAKE_SOURCE_DIR}/mcop # for thread.h
+ ${CMAKE_CURRENT_BINARY_DIR}/.. # for gsl/gslconfig.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/.. # for gsl/gslcommon.h
+ ${GLIB2_INCLUDE_DIRS}
+)
+
+add_library( gsl STATIC ${gsl_SRCS} )
+set_target_properties( gsl PROPERTIES COMPILE_FLAGS -fPIC )
+target_link_libraries( gsl ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${VORBISFILE_LIBRARIES} ${MAD_LIBRARIES} )
+
+
+##### install ###################################
+
+install( FILES ${gsl_INCS} DESTINATION ${INCLUDE_INSTALL_DIR}/gsl )
+
diff --git a/flow/gslpp/CMakeLists.txt b/flow/gslpp/CMakeLists.txt
new file mode 100644
index 0000000..bf145a6
--- /dev/null
+++ b/flow/gslpp/CMakeLists.txt
@@ -0,0 +1,24 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_BINARY_DIR}/mcop
+ ${GLIB2_INCLUDE_DIRS}
+)
+
+set( gslpp_SRCS
+ datahandle.cpp
+)
+
+add_library( gslpp STATIC ${gslpp_SRCS} )
+set_target_properties( gslpp PROPERTIES COMPILE_FLAGS -fPIC) \ No newline at end of file
diff --git a/flow/mcopclass/CMakeLists.txt b/flow/mcopclass/CMakeLists.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/flow/mcopclass/CMakeLists.txt
diff --git a/gmcop/CMakeLists.txt b/gmcop/CMakeLists.txt
new file mode 100644
index 0000000..f49c194
--- /dev/null
+++ b/gmcop/CMakeLists.txt
@@ -0,0 +1,34 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+set( gmcop_INCS
+ giomanager.h
+)
+
+set( gmcop_SRCS
+ giomanager.cc
+)
+
+include_directories(
+ ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
+ ${CMAKE_SOURCE_DIR}/mcop # for iomanager.h, etc.
+ ${GLIB2_INCLUDE_DIRS}
+)
+
+add_library( gmcop SHARED ${gmcop_SRCS} )
+set_target_properties( gmcop PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( gmcop mcop ${GLIB2_LIBRARIES} )
+
+
+##### install ###################################
+
+install( FILES ${gmcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
+install(TARGETS gmcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file
diff --git a/mcop/CMakeLists.txt b/mcop/CMakeLists.txt
new file mode 100644
index 0000000..19bc6ee
--- /dev/null
+++ b/mcop/CMakeLists.txt
@@ -0,0 +1,123 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+set( mcop_INCS
+ ${CMAKE_CURRENT_BINARY_DIR}/arts_export.h
+ buffer.h
+ common.h
+ connection.h
+ core.h
+ dispatcher.h
+ factory.h
+ flowsystem.h
+ idlfilereg.h
+ ifacerepo_impl.h
+ iomanager.h
+ mcoputils.h
+ object.h
+ objectmanager.h
+ pool.h
+ socketconnection.h
+ startupmanager.h
+ tcpconnection.h
+ tcpserver.h
+ type.h
+ unixconnection.h
+ unixserver.h
+ referenceclean.h
+ datapacket.h
+ asyncstream.h
+ notification.h
+ extensionloader.h
+ mcopconfig.h
+ connect.h
+ reference.h
+ weakreference.h
+ dynamicrequest.h
+ anyref.h
+ debug.h
+ delayedreturn.h
+ dynamicskeleton.h
+ thread.h
+ core.idl
+)
+
+set( mcop_SRCS
+ buffer.cc
+ connection.cc
+ core.cc
+ debug.cc
+ dispatcher.cc
+ iomanager.cc
+ object.cc
+ socketconnection.cc
+ tcpconnection.cc
+ unixconnection.cc
+ tcpserver.cc
+ unixserver.cc
+ objectmanager.cc
+ factory.cc
+ idlfilereg.cc
+ ifacerepo_impl.cc
+ mcoputils.cc
+ startupmanager.cc
+ md5.c
+ md5auth.cc
+ referenceclean.cc
+ datapacket.cc
+ asyncstream.cc
+ notification.cc
+ flowsystem.cc
+ extensionloader.cc
+ tmpglobalcomm.cc
+ mcopconfig.cc
+ connect.cc
+ reference.cc
+ type.cc
+ trader_impl.cc
+ dynamicrequest.cc
+ anyref.cc
+ loopback.cc
+ delayedreturn.cc
+ thread.cc
+ dynamicskeleton.cc
+)
+
+configure_file( arts_export.h.in arts_export.h )
+
+if( NOT EXTENSION_DIR )
+ set( EXTENSION_DIR \"${CMAKE_INSTALL_PREFIX}/lib\" )
+endif( NOT EXTENSION_DIR )
+
+if( NOT DTRADER_DIR )
+ set( DTRADER_DIR \"${CMAKE_INSTALL_PREFIX}/lib/mcop\" )
+endif( NOT DTRADER_DIR )
+
+add_definitions(
+ -DEXTENSION_DIR=${EXTENSION_DIR}
+ -DTRADER_DIR=${DTRADER_DIR}
+)
+
+include_directories(
+ ${CMAKE_BINARY_DIR} # for config.h
+ ${CMAKE_CURRENT_BINARY_DIR} # for arts_export.h
+)
+
+add_library( mcop SHARED ${mcop_SRCS} )
+target_link_libraries( mcop ltdlc )
+set_target_properties( mcop PROPERTIES VERSION 1.0.0 SOVERSION 1 )
+
+add_dependencies( mcop ltdlc )
+
+##### install ###################################
+
+install( FILES ${mcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
+install( TARGETS mcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file
diff --git a/mcop_mt/CMakeLists.txt b/mcop_mt/CMakeLists.txt
new file mode 100644
index 0000000..09fed8c
--- /dev/null
+++ b/mcop_mt/CMakeLists.txt
@@ -0,0 +1,18 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+set( mcop_mt_SRCS
+ threads_posix.cc
+)
+
+add_library( mcop_mt SHARED ${mcop_mt_SRCS} )
+set_target_properties( mcop_mt PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( mcop_mt mcop artsflow )
diff --git a/mcopidl/CMakeLists.txt b/mcopidl/CMakeLists.txt
new file mode 100644
index 0000000..ea87893
--- /dev/null
+++ b/mcopidl/CMakeLists.txt
@@ -0,0 +1,34 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+set( mcopidl_SRCS
+ mcopidl.cc
+ yacc.cc
+ scanner.cc
+ namespace.cc
+)
+
+include_directories(
+ ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
+ ${CMAKE_SOURCE_DIR}/mcop # for common.h
+)
+
+#link_directories(
+# ${CMAKE_BINARY_DIR}/mcop
+#)
+
+add_executable( mcopidl ${mcopidl_SRCS} )
+target_link_libraries( mcopidl mcop )
+
+
+##### install ###################################
+
+install( TARGETS mcopidl DESTINATION ${BIN_INSTALL_DIR} )
diff --git a/qtmcop/CMakeLists.txt b/qtmcop/CMakeLists.txt
new file mode 100644
index 0000000..c972153
--- /dev/null
+++ b/qtmcop/CMakeLists.txt
@@ -0,0 +1,50 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_definitions(
+ ${TQT_CFLAGS_OTHER}
+)
+
+include_directories(
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR} # for qiomanager_p.moc
+ ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
+ ${CMAKE_SOURCE_DIR}/mcop # for iomanager.h, etc.
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+add_custom_command(
+ OUTPUT qiomanager_p.moc
+ COMMAND moc-tqt ARGS ${QT_MOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h qiomanager_p.moc
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h
+)
+
+set( qtmcop_INCS
+ qiomanager.h
+)
+
+set( qtmcop_SRCS
+ qiomanager.cc
+ qiomanager_p.moc
+)
+
+add_library( qtmcop SHARED ${qtmcop_SRCS} )
+set_target_properties( qtmcop PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( qtmcop ${TQT_LIBRARIES} mcop )
+
+
+##### install ###################################
+
+install( FILES ${qtmcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
+install(TARGETS qtmcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file
diff --git a/soundserver/CMakeLists.txt b/soundserver/CMakeLists.txt
new file mode 100644
index 0000000..ee4f689
--- /dev/null
+++ b/soundserver/CMakeLists.txt
@@ -0,0 +1,200 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+set( FLOWLIBS artsflow )
+
+configure_file( artsversion-new.h.in artsversion.h )
+
+set( MCOPINC
+ -I${CMAKE_CURRENT_SOURCE_DIR} # for kmedia2.idl
+ -I${CMAKE_SOURCE_DIR}/mcop
+ -I${CMAKE_SOURCE_DIR}/flow
+)
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR} # for artsversion.h
+ ${CMAKE_BINARY_DIR} # for config.h
+ ${CMAKE_BINARY_DIR}/flow # for artsflow.h
+ ${CMAKE_SOURCE_DIR}/flow # for stdsynthmodule.h
+ ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
+ ${CMAKE_SOURCE_DIR}/mcop # for common.h
+)
+
+set( soundserver_INCS
+ ${CMAKE_CURRENT_BINARY_DIR}/artsversion.h
+ ${CMAKE_CURRENT_BINARY_DIR}/soundserver.h
+ ${CMAKE_CURRENT_BINARY_DIR}/kmedia2.h
+ soundserver.idl
+ kmedia2.idl
+)
+
+
+##### libkmedia2_idl ###########################
+
+add_custom_command(
+ OUTPUT kmedia2.cc
+ COMMAND ../mcopidl/mcopidl ARGS -t ${MCOPINC} ${CMAKE_CURRENT_SOURCE_DIR}/kmedia2.idl
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kmedia2.idl
+)
+
+set( kmedia2_idl_SRCS
+ kmedia2.cc
+)
+
+add_library( kmedia2_idl SHARED ${kmedia2_idl_SRCS} )
+set_target_properties( kmedia2_idl PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( kmedia2_idl artsflow_idl )
+
+
+##### libsoundserver_idl ########################
+
+add_custom_command(
+ OUTPUT soundserver.cc
+ COMMAND ../mcopidl/mcopidl ARGS -t ${MCOPINC} ${CMAKE_CURRENT_SOURCE_DIR}/soundserver.idl
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/soundserver.idl
+)
+
+set( soundserver_idl_SRCS
+ soundserver.cc
+)
+
+add_library( soundserver_idl SHARED ${soundserver_idl_SRCS} )
+set_target_properties( soundserver_idl PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( soundserver_idl kmedia2_idl artsflow_idl )
+
+
+##### libartsgslplayobject ######################
+
+set( artsgslplayobject_SRCS
+ gslplayobject_impl.cc
+)
+
+add_library( artsgslplayobject SHARED ${artsgslplayobject_SRCS} )
+set_target_properties( artsgslplayobject PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( artsgslplayobject mcop soundserver_idl artsflow )
+
+
+##### libartswavplayobject ######################
+
+set( artswavplayobject_SRCS
+ wavplayobject_impl.cc
+)
+
+add_library( artswavplayobject SHARED ${artswavplayobject_SRCS} )
+set_target_properties( artswavplayobject PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( artswavplayobject mcop soundserver_idl artsflow )
+
+
+##### libkmedia2 ################################
+
+set( kmedia2_SRCS
+ fileinputstream_impl.cc
+ stdoutwriter_impl.cc
+)
+
+add_library( kmedia2 SHARED ${kmedia2_SRCS} )
+set_target_properties( kmedia2 PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( kmedia2 kmedia2_idl artsflow )
+
+
+##### artsd #####################################
+
+set( artsd_SRCS
+ soundserverv2_impl.cc
+ soundserver_impl.cc
+ simplesoundserver_impl.cc
+ artsd.cc
+ cpuusage.cc
+ samplestorage_impl.cc
+ crashhandler.cc
+ soundserverstartup_impl.cc
+)
+
+add_executable( artsd ${artsd_SRCS} )
+target_link_libraries( artsd soundserver_idl artsflow mcop_mt )
+
+
+##### artsplay ##################################
+
+set( artsplay_SRCS
+ artsplay.cc
+)
+
+add_executable( artsplay ${artsplay_SRCS} )
+target_link_libraries( artsplay soundserver_idl ${LIBPTHREAD} )
+
+
+##### artscat ###################################
+
+set( artscat_SRCS
+ artsrec.cc
+)
+
+set( CMAKE_EXE_LINKER_FLAGS ${USE_THREADS} )
+add_executable( artscat ${artscat_SRCS} )
+target_link_libraries( artscat soundserver_idl ${FLOWLIBS} ${LIBPTHREAD} )
+
+
+##### artswrapper ###############################
+
+set( artswrapper_SRCS
+ artswrapper.c
+)
+
+add_executable( artswrapper ${artswrapper_SRCS} )
+set_target_properties( artswrapper PROPERTIES COMPILE_FLAGS -DEXECUTE=\\"${artsdpath}\\" )
+target_link_libraries( artswrapper )
+
+
+##### artsshell #################################
+
+set( artsshell_SRCS
+ artsshell.cc
+ tradercheck.cc
+)
+
+add_executable( artsshell ${artsshell_SRCS} )
+target_link_libraries( artsshell soundserver_idl ${LIBPTHREAD} )
+
+
+
+##### artsrec ###################################
+
+set( artsrec_SRCS
+ artsrec.cc
+)
+
+add_executable( artsrec ${artsrec_SRCS} )
+target_link_libraries( artsrec soundserver_idl ${FLOWLIBS} ${LIBPTHREAD} )
+
+
+##### install ###################################
+
+install( FILES ${soundserver_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
+
+install(TARGETS
+ kmedia2_idl
+ soundserver_idl
+ artsgslplayobject
+ artswavplayobject
+ kmedia2
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+)
+
+install( TARGETS
+ artsd
+ artsplay
+ artscat
+ artswrapper
+ artsshell
+ artsrec
+ DESTINATION ${BIN_INSTALL_DIR}
+) \ No newline at end of file