diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 73 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 300 | ||||
-rw-r--r-- | akode/CMakeLists.txt | 31 | ||||
-rw-r--r-- | akode/akodeplay/CMakeLists.txt | 30 | ||||
-rw-r--r-- | akode/lib/CMakeLists.txt | 100 | ||||
-rw-r--r-- | akode/lib/akode_export.h.cmake | 53 | ||||
-rw-r--r-- | akode/plugins/CMakeLists.txt | 26 | ||||
-rw-r--r-- | akode/plugins/alsa_sink/CMakeLists.txt | 31 | ||||
-rw-r--r-- | akode/plugins/ffmpeg_decoder/CMakeLists.txt | 33 | ||||
-rw-r--r-- | akode/plugins/jack_sink/CMakeLists.txt | 32 | ||||
-rw-r--r-- | akode/plugins/mpc_decoder/CMakeLists.txt | 36 | ||||
-rw-r--r-- | akode/plugins/mpc_decoder/mppdec/CMakeLists.txt | 40 | ||||
-rw-r--r-- | akode/plugins/mpeg_decoder/CMakeLists.txt | 31 | ||||
-rw-r--r-- | akode/plugins/oss_sink/CMakeLists.txt | 31 | ||||
-rw-r--r-- | akode/plugins/polyp_sink/CMakeLists.txt | 32 | ||||
-rw-r--r-- | akode/plugins/src_resampler/CMakeLists.txt | 31 | ||||
-rw-r--r-- | akode/plugins/sun_sink/CMakeLists.txt | 31 | ||||
-rw-r--r-- | akode/plugins/xiph_decoder/CMakeLists.txt | 44 | ||||
m--------- | cmake | 0 | ||||
-rw-r--r-- | config.h.cmake | 62 |
21 files changed, 1050 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5b98c56 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "cmake"] + path = cmake + url = http://system@scm.trinitydesktop.org/scm/git/tde-common-cmake diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f8e2d94 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +cmake_minimum_required( VERSION 2.6 ) + + +##### general package setup ##################### + +project( akode ) +set( PACKAGE akode ) +set( VERSION 2.0.2 ) + + +##### include essential cmake modules ########### + +include( FindPkgConfig ) +include( CheckCXXSourceCompiles ) +include( CheckFunctionExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) + + +##### include our cmake modules ################# + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) +tde_setup_architecture_flags( ) + + +##### setup install paths ####################### + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff ############################ + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) + +OPTION( WITH_LIBLTDL "Build with libltdl" ${WITH_ALL_OPTIONS} ) + +OPTION( WITH_ALSA_SINK "Build with alsa sink" ${WITH_ALL_OPTIONS} ) +OPTION( WITH_JACK_SINK "Build with jack sink" ${WITH_ALL_OPTIONS} ) +OPTION( WITH_POLYP_SINK "Build with polyp sink" OFF ) +OPTION( WITH_OSS_SINK "Build with oss sink" ${WITH_ALL_OPTIONS} ) +OPTION( WITH_SUN_SINK "Build with sun sink" OFF ) + +OPTION( WITH_FFMPEG_DECODER "Build with ffmeeg decoder" OFF ) +option( WITH_MPC_DECODER "Build with mpc decoder" ON ) +option( WITH_MPEG_DECODER "Build with mpeg decoder" ${WITH_ALL_OPTIONS} ) +OPTION( WITH_SRC_RESAMPLER "Build with src resampler" ${WITH_ALL_OPTIONS} ) +option( WITH_XIPH_DECODER "Build with xiph decoder" ${WITH_ALL_OPTIONS} ) + + +##### configure checks ########################## + +include( ConfigureChecks.cmake ) +add_definitions( -DHAVE_CONFIG_H ) +configure_file( config.h.cmake config.h @ONLY ) + + +##### build ##################################### + +tde_auto_add_subdirectories() + diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..1fa37d7 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,300 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + + +##### check for system libraries ################ + +if( WITH_LIBLTDL ) + # check libltdl + check_include_file( "ltdl.h" HAVE_LTDL_H ) + if( HAVE_LTDL_H ) + set( AKODE_LIBDL ltdl ) + check_library_exists( ${AKODE_LIBDL} lt_dlopen "" HAVE_LIBLTDL ) + endif( HAVE_LTDL_H) + if( NOT HAVE_LIBLTDL ) + tde_message_fatal( "libltdl are required, but not found on your system" ) + endif( NOT HAVE_LIBLTDL ) + +else( WITH_LIBLTDL ) + # check libdl + set( AKODE_LIBDL dl ) + check_library_exists( ${AKODE_LIBDL} dlopen /lib HAVE_LIBDL ) + if( NOT HAVE_LIBDL ) + unset( AKODE_LIBDL ) + check_function_exists( dlopen HAVE_DLOPEN ) + if( NOT HAVE_DLOPEN ) + tde_message_fatal( "libdl are required, but not found on your system" ) + endif( NOT HAVE_DLOPEN ) + endif( NOT HAVE_LIBDL ) +endif( WITH_LIBLTDL ) + + +find_package( Threads ) + + +check_include_file( "semaphore.h" HAVE_SEM ) +check_library_exists( rt sem_init "" HAVE_LIBRT ) +if( HAVE_LIBRT ) + set( SEM_LIBRARIES rt ) +endif( HAVE_LIBRT ) + + +check_library_exists( c posix_madvise "" HAVE_POSIX_MADVISE ) +check_library_exists( c posix_fadvise "" HAVE_POSIX_FADVISE ) +check_library_exists( c madvise "" HAVE_MADVISE ) +check_library_exists( c fadvise "" HAVE_FADVISE ) +check_cxx_source_compiles( " + #include <sys/types.h> + #include <sys/mman.h> + int main() { ::madvise((char*)0,0, MADV_SEQUENTIAL); return 0; }" + HAVE_MADVISE_PROTOTYPE ) +if( NOT HAVE_MADVISE_PROTOTYPE ) + set( NEED_MADVISE_PROTOTYPE 1 ) +endif( NOT HAVE_MADVISE_PROTOTYPE ) + + +check_include_file( "getopt.h" HAVE_GETOPT_H ) +check_library_exists( c getopt_long "" HAVE_GNU_GETOPT ) +check_include_file( "stdint.h" HAVE_STDINT_H ) +if( NOT HAVE_STDINT_H ) + check_include_file( "inttypes.h" HAVE_INTTYPES_H ) +endif( NOT HAVE_STDINT_H ) +check_include_file( "sys/types.h" HAVE_SYS_TYPES_H ) + + +##### check alsa support ######################## + +if( WITH_ALSA_SINK ) + + pkg_search_module( ALSA alsa>=0.90 ) + + if( NOT ALSA_FOUND ) + tde_message_fatal( "alsa >= 0.90 are required, but not found on your system" ) + endif( NOT ALSA_FOUND ) + +endif( WITH_ALSA_SINK ) + + +##### check jack support ######################## + +if( WITH_JACK_SINK ) + + pkg_search_module( JACK jack>=0.90 ) + + if( NOT JACK_FOUND ) + tde_message_fatal( "jack >= 0.90 are required, but not found on your system" ) + endif( NOT JACK_FOUND ) + +endif( WITH_JACK_SINK ) + + +##### check oss support ######################### + +if( WITH_OSS_SINK ) + + check_include_file( "soundcard.h" HAVE_SOUNDCARD_H ) + if( NOT HAVE_SOUNDCARD_H ) + check_include_file( "sys/soundcard.h" HAVE_SYS_SOUNDCARD_H ) + if( NOT HAVE_SYS_SOUNDCARD_H ) + tde_message_fatal( "soundcard.h are required, but not found on your system" ) + endif( NOT HAVE_SYS_SOUNDCARD_H ) + endif( NOT HAVE_SOUNDCARD_H ) + + check_library_exists( ossaudio _oss_ioctl "" HAVE_OSSAUDIO ) + if( HAVE_OSSAUDIO ) + set( OSSAUDIO_LIBRARIES "-lossaudio" ) + endif( HAVE_OSSAUDIO ) + +endif( WITH_OSS_SINK ) + + +##### check polyp support ####################### + +if( WITH_POLYP_SINK ) + + pkg_search_module( POLYP polyplib-simple>=0.70 ) + + if( NOT POLYP_FOUND ) + tde_message_fatal( "polyplib-simple >= 0.70 are required, but not found on your system" ) + endif( NOT POLYP_FOUND ) + +endif( WITH_POLYP_SINK ) + + +##### check sun support ######################### + +if( WITH_SUN_SINK ) + + check_include_file( "sys/audioio.h" HAVE_AUDIOIO_H ) + if( NOT HAVE_AUDIOIO_H ) + tde_message_fatal( "sun audioio are required, but not found on your system" ) + endif( NOT HAVE_AUDIOIO_H ) + +endif( WITH_SUN_SINK ) + + +##### check ffmpeg support ###################### + +if( WITH_FFMPEG_DECODER ) + + pkg_search_module( AVFORMAT libavformat>=50 ) + if( NOT AVFORMAT_FOUND ) + tde_message_fatal( "libavformat >= 50 are required, but not found on your system" ) + endif( NOT AVFORMAT_FOUND ) + + pkg_search_module( AVCODEC libavcodec>=50 ) + if( NOT AVCODEC_FOUND ) + tde_message_fatal( "libavcodec >= 50 are required, but not found on your system" ) + endif( NOT AVCODEC_FOUND ) + + set( HAVE_FFMPEG 1 ) + +endif( WITH_FFMPEG_DECODER ) + + +##### check mad support ######################### + +if( WITH_MPEG_DECODER ) + + pkg_search_module( MAD mad ) + + if( NOT MAD_FOUND ) + find_library( MAD_LIBRARIES NAMES mad ) + find_path( MAD_INCLUDE_DIRS mad.h ) + if( NOT MAD_LIBRARIES ) + tde_message_fatal( "mad are required, but not found on your system" ) + endif( NOT MAD_LIBRARIES ) + endif( NOT MAD_FOUND ) + +endif( WITH_MPEG_DECODER ) + + +##### check FLAC support ######################## + +if( WITH_XIPH_DECODER ) + + # check for FLAC module + pkg_search_module( FLAC flac>=1.1.3 ) + if( FLAC_FOUND ) + set( HAVE_LIBFLAC113 1 ) + else( FLAC_FOUND ) + # check for FLAC 1.1.3 + check_include_file( "FLAC/metadata.h" HAVE_FLAC113_H ) + if( HAVE_FLAC113_H ) + tde_save_and_set( CMAKE_REQUIRED_LIBRARIES ogg ) + check_library_exists( FLAC FLAC__stream_decoder_seek_absolute "" HAVE_LIBFLAC113 ) + tde_restore( CMAKE_REQUIRED_LIBRARIES ) + if( HAVE_LIBFLAC113 ) + set( FLAC_LIBRARIES "-lFLAC -logg" ) + endif( HAVE_LIBFLAC113 ) + endif( HAVE_FLAC113_H ) + + # check for FLAC 1.1.1 or 1.1.2 + if( NOT HAVE_LIBFLAC113 ) + check_include_file( "FLAC/seekable_stream_decoder.h" HAVE_FLAC_H ) + if( HAVE_FLAC_H ) + check_library_exists( FLAC FLAC__seekable_stream_decoder_process_single "" HAVE_LIBFLAC ) + if( HAVE_LIBFLAC ) + set( FLAC_LIBRARIES "-lFLAC" ) + endif( HAVE_LIBFLAC ) + endif( HAVE_FLAC_H ) + + check_include_file( "OggFLAC/seekable_stream_decoder.h" HAVE_OGGFLAC_H ) + if( HAVE_OGGFLAC_H ) + tde_save_and_set( CMAKE_REQUIRED_LIBRARIES m OggFLAC FLAC ) + check_library_exits( OggFLAC OggFLAC__seekable_stream_decoder_process_single "" HAVE_LIBOGGFLAC ) + tde_restore( CMAKE_REQUIRED_LIBRARIES ) + if( HAVE_LIBOGGFLAC ) + set( OGGFLAC_LIBRARIES "-lOggFLAC" ) + endif( HAVE_LIBFLAC ) + endif( HAVE_OGGFLAC_H ) + endif( NOT HAVE_LIBFLAC113 ) + endif( FLAC_FOUND ) + + if( NOT FLAC_LIBRARIES ) + tde_message_fatal( "FLAC >= 1.1.1 are required, but not found on your system" ) + endif( NOT FLAC_LIBRARIES ) + +endif( WITH_XIPH_DECODER ) + + +##### check speex support ####################### + +if( WITH_XIPH_DECODER ) + + # check for speex module + pkg_search_module( SPEEX speex>=1.2 ) + if( NOT SPEEX_FOUND ) + # check for speex >= 1.1 + pkg_search_module( SPEEX speex>=1.1 ) + if( SPEEX_FOUND ) + set( HAVE_SPEEX11 1 ) + check_library_exits( speex speex_decode_int "" HAVE_SPEEX_DECODE_INT ) + if( NOT HAVE_SPEEX_DECODE_INT ) + set( BROKEN_SPEEX11 1 ) + endif( ) + else( ) + pkg_search_module( SPEEX speex ) + endif( ) + + endif( ) + + if( SPEEX_FOUND ) + set( HAVE_SPEEX 1 ) + if( NOT EXISTS ${SPEEX_INCLUDEDIR}/speex.h ) + find_path( SPEEX_EXTRA_INCLUDEDIR "speex.h" ${SPEEX_INCLUDEDIR}/speex ) + if( NOT SPEEX_EXTRA_INCLUDEDIR ) + tde_message_fatal( "speex are required, but header not found on your system" ) + endif( NOT SPEEX_EXTRA_INCLUDEDIR ) + list( APPEND SPEEX_INCLUDE_DIRS "${SPEEX_EXTRA_INCLUDEDIR}" ) + endif( NOT EXISTS ${SPEEX_INCLUDEDIR}/speex.h ) + else( SPEEX_FOUND ) + tde_message_fatal( "speex are required, but not found on your system" ) + endif( SPEEX_FOUND ) + +endif( WITH_XIPH_DECODER ) + + +##### check ogg/vorbis support ################## + +if( WITH_XIPH_DECODER ) + + pkg_search_module( VORBIS vorbis ) + if( NOT VORBIS_FOUND ) + tde_message_fatal( "ogg/vorbis are required, but not found on your system" ) + endif( NOT VORBIS_FOUND ) + + pkg_search_module( VORBISFILE vorbisfile ) + if( NOT VORBISFILE_FOUND ) + tde_message_fatal( "ogg/vorbisfile are required, but not found on your system" ) + endif( NOT VORBISFILE_FOUND ) + + set( HAVE_OGG_VORBIS 1 ) + +endif( WITH_XIPH_DECODER ) + + +##### check samplerate support ################## + +if( WITH_SRC_RESAMPLER ) + + pkg_search_module( SAMPLERATE samplerate ) + + if( NOT SAMPLERATE_FOUND ) + find_library( SAMPLERATE_LIBRARIES NAMES samplerate ) + find_path( SAMPLERATE_INCLUDE_DIRS samplerate.h ) + if( NOT SAMPLERATE_LIBRARIES ) + tde_message_fatal( "samplerate are required, but not found on your system" ) + endif( NOT SAMPLERATE_LIBRARIES ) + endif( NOT SAMPLERATE_FOUND ) + +endif( WITH_SRC_RESAMPLER ) + diff --git a/akode/CMakeLists.txt b/akode/CMakeLists.txt new file mode 100644 index 0000000..01009c0 --- /dev/null +++ b/akode/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + + +#### pkg-config ################################# + +set( prefix ${CMAKE_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" + exec_prefix ${EXEC_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${EXEC_INSTALL_PREFIX}" "\${exec_prefix}" + libdir ${LIB_INSTALL_DIR} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" + includedir ${INCLUDE_INSTALL_DIR} ) + +configure_file( akode-config.in akode-config @ONLY ) +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/akode-config + DESTINATION ${BIN_INSTALL_DIR} ) + + +##### build ##################################### + +tde_auto_add_subdirectories() + diff --git a/akode/akodeplay/CMakeLists.txt b/akode/akodeplay/CMakeLists.txt new file mode 100644 index 0000000..40983fd --- /dev/null +++ b/akode/akodeplay/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib +) + + +##### akodeplay ################################# + +set( target akodeplay ) + +tde_add_executable( + ${target} + SOURCES ${target}.cpp + LINK akode-shared + DESTINATION ${BIN_INSTALL_DIR} +) + diff --git a/akode/lib/CMakeLists.txt b/akode/lib/CMakeLists.txt new file mode 100644 index 0000000..9ecb472 --- /dev/null +++ b/akode/lib/CMakeLists.txt @@ -0,0 +1,100 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + +if( UNIX ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden" ) + set( __KDE_HAVE_GCC_VISIBILITY 1 ) +endif( UNIX ) +configure_file( akode_export.h.cmake akode_export.h @ONLY ) + + +##### library ################################### + +set( target akode ) + +set( ${target}_SRCS + bytebuffer.cpp + audiobuffer.cpp + pluginhandler.cpp + decoderpluginhandler.cpp + resamplerpluginhandler.cpp + sinkpluginhandler.cpp + encoderpluginhandler.cpp + fast_resampler.cpp + crossfader.cpp + volumefilter.cpp + localfile.cpp + mmapfile.cpp + wav_decoder.cpp + auto_sink.cpp + void_sink.cpp + converter.cpp + buffered_decoder.cpp + player.cpp + magic.cpp +) + +tde_add_library( + ${target} SHARED + VERSION 2.0.0 + SOURCES ${${target}_SRCS} + LINK ${CMAKE_THREAD_LIBS_INIT} ${AKODE_LIBDL} ${SEM_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + +set_property( + TARGET ${target}-shared + APPEND PROPERTY COMPILE_DEFINITIONS + AKODE_SEARCHDIR="${LIB_INSTALL_DIR}" +) + + +##### headers ################################### + +set( ${target}_INCLUDES + ${CMAKE_CURRENT_BINARY_DIR}/akode_export.h + akodelib.h + decoder.h + sink.h + encoder.h + audioconfiguration.h + audioframe.h + audiobuffer.h + bytebuffer.h + file.h + localfile.h + mmapfile.h + pluginhandler.h + crossfader.h + volumefilter.h + resampler.h + fast_resampler.h + buffered_decoder.h + wav_decoder.h + auto_sink.h + void_sink.h + player.h + magic.h + converter.h + framedecoder.h +) + +install( + FILES ${${target}_INCLUDES} + DESTINATION ${INCLUDE_INSTALL_DIR}/akode +) + diff --git a/akode/lib/akode_export.h.cmake b/akode/lib/akode_export.h.cmake new file mode 100644 index 0000000..7fc7fe8 --- /dev/null +++ b/akode/lib/akode_export.h.cmake @@ -0,0 +1,53 @@ +/* This file is part of the KDE libraries + Copyright (c) 2002-2003 KDE Team + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef AKODE_EXPORT_H +#define AKODE_EXPORT_H + +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/** + * The ARTS_NO_EXPORT macro marks the symbol of the given variable + * to be hidden. A hidden symbol is stripped during the linking step, + * so it can't be used from outside the resulting library, which is similar + * to static. However, static limits the visibility to the current + * compilation unit. hidden symbols can still be used in multiple compilation + * units. + * + * \code + * int AKODE_NO_EXPORT foo; + * int AKODE_EXPORT bar; + * \end + */ + +#if defined(__KDE_HAVE_GCC_VISIBILITY) +/* Visibility is available for GCC newer than 3.4. + * See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9283 + */ +#define AKODE_NO_EXPORT __attribute__ ((visibility("hidden"))) +#define AKODE_EXPORT __attribute__ ((visibility("default"))) +#elif defined(_WIN32) +#define AKODE_NO_EXPORT +#define AKODE_EXPORT __declspec(dllexport) +#else +#define AKODE_NO_EXPORT +#define AKODE_EXPORT +#endif + +#endif /* AKODE_EXPORTS */ diff --git a/akode/plugins/CMakeLists.txt b/akode/plugins/CMakeLists.txt new file mode 100644 index 0000000..ce0f3a4 --- /dev/null +++ b/akode/plugins/CMakeLists.txt @@ -0,0 +1,26 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + + +##### build ##################################### + +tde_conditional_add_subdirectory( WITH_ALSA_SINK alsa_sink ) +tde_conditional_add_subdirectory( WITH_JACK_SINK jack_sink ) +tde_conditional_add_subdirectory( WITH_OSS_SINK oss_sink ) +tde_conditional_add_subdirectory( WITH_POLYP_SINK polyp_sink ) +tde_conditional_add_subdirectory( WITH_SUN_SINK sun_sink ) + +tde_conditional_add_subdirectory( WITH_FFMPEG_DECODER ffmpeg_decoder ) +tde_conditional_add_subdirectory( WITH_MPC_DECODER mpc_decoder ) +tde_conditional_add_subdirectory( WITH_MPEG_DECODER mpeg_decoder ) +tde_conditional_add_subdirectory( WITH_SRC_RESAMPLER src_resampler ) +tde_conditional_add_subdirectory( WITH_XIPH_DECODER xiph_decoder ) + diff --git a/akode/plugins/alsa_sink/CMakeLists.txt b/akode/plugins/alsa_sink/CMakeLists.txt new file mode 100644 index 0000000..7e9b907 --- /dev/null +++ b/akode/plugins/alsa_sink/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +##### library ################################### + +set( target libakode_alsa_sink ) + +tde_add_library( + ${target} MODULE + SOURCES alsa_sink.cpp + LINK akode-shared ${ALSA_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/ffmpeg_decoder/CMakeLists.txt b/akode/plugins/ffmpeg_decoder/CMakeLists.txt new file mode 100644 index 0000000..f1d4c73 --- /dev/null +++ b/akode/plugins/ffmpeg_decoder/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${AVFORMAT_INCLUDE_DIRS} + ${AVCODEC_INCLUDE_DIRS} +) + + +##### library ################################### + +set( target libakode_ffmpeg_decoder ) + +tde_add_library( + ${target} MODULE + SOURCES ffmpeg_decoder.cpp + LINK akode-shared ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/jack_sink/CMakeLists.txt b/akode/plugins/jack_sink/CMakeLists.txt new file mode 100644 index 0000000..eb6152e --- /dev/null +++ b/akode/plugins/jack_sink/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${JACK_INCLUDE_DIRS} +) + + +##### library ################################### + +set( target libakode_jack_sink ) + +tde_add_library( + ${target} MODULE + SOURCES jack_sink.cpp + LINK akode-shared ${JACK_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/mpc_decoder/CMakeLists.txt b/akode/plugins/mpc_decoder/CMakeLists.txt new file mode 100644 index 0000000..b2faab2 --- /dev/null +++ b/akode/plugins/mpc_decoder/CMakeLists.txt @@ -0,0 +1,36 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/mppdec +) + + +##### mppdec #################################### +add_subdirectory( mppdec ) + + +##### library ################################### + +set( target libakode_mpc_decoder ) + +tde_add_library( + ${target} MODULE + SOURCES mpc_decoder.cpp + LINK akode-shared akode_mppdec-static + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/mpc_decoder/mppdec/CMakeLists.txt b/akode/plugins/mpc_decoder/mppdec/CMakeLists.txt new file mode 100644 index 0000000..9cd3a4c --- /dev/null +++ b/akode/plugins/mpc_decoder/mppdec/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +##### library ################################### + +set( target akode_mppdec ) + +set( ${target}_SRCS + bitstream.cpp + huffsv46.cpp + huffsv7.cpp + idtag.cpp + mpc_dec.cpp + requant.cpp + streaminfo.cpp + synth_filter.cpp +) + +tde_add_library( + ${target} STATIC_PIC + SOURCES ${${target}_SRCS} +) + diff --git a/akode/plugins/mpeg_decoder/CMakeLists.txt b/akode/plugins/mpeg_decoder/CMakeLists.txt new file mode 100644 index 0000000..86bb896 --- /dev/null +++ b/akode/plugins/mpeg_decoder/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +##### library ################################### + +set( target libakode_mpeg_decoder ) + +tde_add_library( + ${target} MODULE + SOURCES mpeg_decoder.cpp + LINK akode-shared ${MAD_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/oss_sink/CMakeLists.txt b/akode/plugins/oss_sink/CMakeLists.txt new file mode 100644 index 0000000..7af52b8 --- /dev/null +++ b/akode/plugins/oss_sink/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +##### library ################################### + +set( target libakode_oss_sink ) + +tde_add_library( + ${target} MODULE + SOURCES oss_sink.cpp + LINK akode-shared ${OSSAUDIO_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/polyp_sink/CMakeLists.txt b/akode/plugins/polyp_sink/CMakeLists.txt new file mode 100644 index 0000000..90c4f3c --- /dev/null +++ b/akode/plugins/polyp_sink/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${POLYP_INCLUDE_DIRS} +) + + +##### library ################################### + +set( target libakode_polyp_sink ) + +tde_add_library( + ${target} MODULE + SOURCES polyp_sink.cpp + LINK akode-shared ${POLYP_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/src_resampler/CMakeLists.txt b/akode/plugins/src_resampler/CMakeLists.txt new file mode 100644 index 0000000..6489dc3 --- /dev/null +++ b/akode/plugins/src_resampler/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +##### library ################################### + +set( target libakode_src_resampler ) + +tde_add_library( + ${target} MODULE + SOURCES src_resampler.cpp + LINK akode-shared ${SAMPLERATE_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/sun_sink/CMakeLists.txt b/akode/plugins/sun_sink/CMakeLists.txt new file mode 100644 index 0000000..cf450bf --- /dev/null +++ b/akode/plugins/sun_sink/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +##### library ################################### + +set( target libakode_sun_sink ) + +tde_add_library( + ${target} MODULE + SOURCES sun_sink.cpp + LINK akode-shared + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/akode/plugins/xiph_decoder/CMakeLists.txt b/akode/plugins/xiph_decoder/CMakeLists.txt new file mode 100644 index 0000000..a0d1f28 --- /dev/null +++ b/akode/plugins/xiph_decoder/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################# +# +# (C) 2015 Slávek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/akode/lib + ${CMAKE_SOURCE_DIR}/akode/lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${SPEEX_INCLUDE_DIRS} +) + + +##### library ################################### + +set( target libakode_xiph_decoder ) + +set( ${target}_SRCS + flac_decoder.cpp + flac113_decoder.cpp + speex_decoder.cpp + vorbis_decoder.cpp + xiph_decoder.cpp +) + +tde_add_library( + ${target} MODULE + SOURCES ${${target}_SRCS} + LINK + akode-shared + ${FLAC_LIBRARIES} ${OGGFLAC_LIBRARIES} + ${VORBIS_LIBRARIES} ${VORBISFILE_LIBRARIES} + ${SPEEX_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) + diff --git a/cmake b/cmake new file mode 160000 +Subproject 1994b808819fd74446cb8f1a0491b3e10244f46 diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..ea60b7d --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,62 @@ + +/* defined if you have libltdl library and header */ +#cmakedefine HAVE_LIBLTDL + +/* Define if your platform has posix_madvise */ +#cmakedefine HAVE_POSIX_MADVISE + +/* Define if your platform has posix_fadvise */ +#cmakedefine HAVE_POSIX_FADVISE + +/* Define if your platform has fadvise */ +#cmakedefine HAVE_FADVISE + +/* Define if your platform has madvise */ +#cmakedefine HAVE_MADVISE + +/* Define if madvise has no usefull prototype */ +#cmakedefine NEED_MADVISE_PROTOTYPE + +/* Define if your platform has getopt_long from glibc */ +#cmakedefine HAVE_GNU_GETOPT + +/* Define to 1 if you have the <stdint.h> header file. */ +#cmakedefine HAVE_STDINT_H + +/* Define to 1 if you have the <inttypes.h> header file. */ +#cmakedefine HAVE_INTTYPES_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <soundcard.h> header file. */ +#cmakedefine HAVE_SOUNDCARD_H + +/* Define to 1 if you have the <sys/soundcard.h> header file. */ +#cmakedefine HAVE_SYS_SOUNDCARD_H + +/* Define if you have libavcodec and libavformat from FFMPEG (required for WMA + and RealAudio decoding) */ +#cmakedefine HAVE_FFMPEG + +/* Define if you have libFLAC 1.1.3 or newer */ +#cmakedefine HAVE_LIBFLAC113 + +/* Define if you have libFLAC 1.1.1 or 1.1.2 */ +#cmakedefine HAVE_LIBFLAC + +/* Define if you have libOggFLAC (required for loading OggFLAC files) */ +#cmakedefine HAVE_LIBOGGFLAC + +/* Define if you have speex installed */ +#cmakedefine HAVE_SPEEX + +/* Define if you have libspeex 1.1.x installed */ +#cmakedefine HAVE_SPEEX11 + +/* Define if you have one of the broken libspeex 1.1.x < 1.1.5 */ +#cmakedefine BROKEN_SPEEX11 + +/* Define if you have ogg/vorbis installed */ +#cmakedefine HAVE_OGG_VORBIS + |