diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-10-05 19:35:48 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-10-05 19:35:48 +0000 |
commit | 36bb41f5bea5485f7c47dd18f47fc6177a370270 (patch) | |
tree | b68d307bf656672eb444be1393342607875621ed /flow | |
parent | 3a7fbece07c6265d8ca9537efa1d269957bc862a (diff) | |
download | arts-36bb41f5bea5485f7c47dd18f47fc6177a370270.tar.gz arts-36bb41f5bea5485f7c47dd18f47fc6177a370270.zip |
[dependencies/arts] added initial cmake support
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1182851 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'flow')
-rw-r--r-- | flow/CMakeLists.txt | 124 | ||||
-rw-r--r-- | flow/gsl/CMakeLists.txt | 161 | ||||
-rw-r--r-- | flow/gslpp/CMakeLists.txt | 24 | ||||
-rw-r--r-- | flow/mcopclass/CMakeLists.txt | 0 |
4 files changed, 309 insertions, 0 deletions
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 |