From 593ffe80331f9cca68664f9dd501ce95b545f0c8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Feb 2009 01:34:03 +0000 Subject: [PATCH] Build VAmp plugins. git-svn-id: svn://localhost/ardour2/branches/3.0@4670 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/wscript | 2 +- libs/ardour/wscript | 2 +- libs/rubberband/wscript | 2 +- libs/vamp-plugins/wscript | 54 +++++++++++++++++++++++++++++++++++++++ libs/vamp-sdk/wscript | 20 ++++++++++++--- wscript | 1 + 6 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 libs/vamp-plugins/wscript diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 48a47ab0f7..f1a90deaf6 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -222,7 +222,7 @@ def build(bld): obj.target = 'ardour-3.0' obj.uselib = 'UUID FLAC GLIBMM GTHREAD GTK GNOMECANVAS OGG ALSA' obj.uselib += ' GTKMM GNOMECANVASMM' - obj.uselib_local = '''libpbd libmidipp libevoral libvamp libtaglib libardour libsurfaces + obj.uselib_local = '''libpbd libmidipp libtaglib libardour libsurfaces libgtkmm2ext libgtk2_ardour_c libtaglib''' obj.install_path = '' obj.cxxflags = '-DVERSIONSTRING=\\\"' + GTK2_ARDOUR_VERSION + '\\\"' diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 3001d063d3..e48632c6a0 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -205,7 +205,7 @@ def build(bld): obj.name = 'libardour' obj.target = 'ardour' obj.uselib = 'GLIBMM AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF' - obj.uselib_local = 'libpbd libmidipp libevoral libvamp libtaglib' + obj.uselib_local = 'libpbd libmidipp libevoral libvamphost libardourvampplugins libtaglib' obj.vnum = LIBARDOUR_LIB_VERSION obj.install_path = '' obj.cxxflags = ' -DPACKAGE=\\\"libardour3\\\"' diff --git a/libs/rubberband/wscript b/libs/rubberband/wscript index d43ec08c16..23d2950b53 100644 --- a/libs/rubberband/wscript +++ b/libs/rubberband/wscript @@ -54,7 +54,7 @@ def build(bld): obj.name = 'librubberband' obj.target = 'rubberband' obj.uselib = 'FFTW3 FFTW3F SAMPLERATE SNDFILE' - obj.uselib_local = 'libvamp' + obj.uselib_local = 'libvamphost' obj.vnum = LIBRUBBERBAND_LIB_VERSION obj.install_path = '' obj.cxxflags = '-DPACKAGE=\\\"librubberband\\\"' diff --git a/libs/vamp-plugins/wscript b/libs/vamp-plugins/wscript new file mode 100644 index 0000000000..ae4a6ae1a8 --- /dev/null +++ b/libs/vamp-plugins/wscript @@ -0,0 +1,54 @@ +#!/usr/bin/env python +import autowaf + +# Version of this package (even if built as a child) +LIBARDOURVAMPPLUGINS_VERSION = '0.0.0' + +# Library version (UNIX style major, minor, micro) +# major increment <=> incompatible changes +# minor increment <=> compatible changes (additions) +# micro increment <=> no interface changes +LIBARDOURVAMPPLUGINS_LIB_VERSION = '0.0.0' + +# Variables for 'waf dist' +APPNAME = 'libardourvampplugins' +VERSION = LIBARDOURVAMPPLUGINS_VERSION + +# Mandatory variables +srcdir = '.' +blddir = 'build' + +def set_options(opt): + autowaf.set_options(opt) + +def configure(conf): + autowaf.configure(conf) + autowaf.check_tool(conf, 'compiler_cxx') + autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True) + autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', mandatory=False) + +def build(bld): + # Library + obj = bld.new_task_gen('cxx', 'shlib') + obj.source = ''' + plugins.cpp + AmplitudeFollower.cpp + PercussionOnsetDetector.cpp + SpectralCentroid.cpp + ZeroCrossing.cpp + ''' + obj.export_incdirs = ['.'] + obj.includes = ['.'] + obj.name = 'libardourvampplugins' + obj.target = 'ardourvampplugins' + obj.uselib = 'FFTW3F' + obj.uselib_local = 'libvampplugin' + if bld.env['HAVE_AUBIO']: + obj.source += ' Onset.cpp ' + obj.uselib += ' AUBIO ' + obj.vnum = LIBARDOURVAMPPLUGINS_LIB_VERSION + obj.install_path = '' + +def shutdown(): + autowaf.shutdown() + diff --git a/libs/vamp-sdk/wscript b/libs/vamp-sdk/wscript index bbbae61308..ebb1d71e4a 100644 --- a/libs/vamp-sdk/wscript +++ b/libs/vamp-sdk/wscript @@ -29,7 +29,7 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DHAVE_FFTW3') def build(bld): - # Library + # Host Library obj = bld.new_task_gen('cxx', 'shlib') obj.source = ''' vamp-sdk/PluginHostAdapter.cpp @@ -42,8 +42,22 @@ def build(bld): ''' obj.export_incdirs = ['.'] obj.includes = ['.'] - obj.name = 'libvamp' - obj.target = 'vamp' + obj.name = 'libvamphost' + obj.target = 'vamphost' + obj.uselib = 'FFTW3 FFTW3F' + obj.vnum = LIBVAMP_LIB_VERSION + obj.install_path = '' + + # Plugin Library + obj = bld.new_task_gen('cxx', 'shlib') + obj.source = ''' + vamp-sdk/PluginAdapter.cpp + vamp-sdk/RealTime.cpp + ''' + obj.export_incdirs = ['.'] + obj.includes = ['.'] + obj.name = 'libvampplugin' + obj.target = 'vampplugin' obj.uselib = 'FFTW3 FFTW3F' obj.vnum = LIBVAMP_LIB_VERSION obj.install_path = '' diff --git a/wscript b/wscript index 332e9907cf..d54966fe49 100644 --- a/wscript +++ b/wscript @@ -14,6 +14,7 @@ children = [ 'libs/midi++2', 'libs/evoral', 'libs/vamp-sdk', + 'libs/vamp-plugins', 'libs/taglib', 'libs/rubberband', 'libs/surfaces',