allow linking unbundled versions of some libraries
(libltc, rubberband, taglib, vamp-sdk)
This commit is contained in:
parent
85fd343145
commit
5f00d2f3a7
@ -45,7 +45,7 @@
|
||||
#include "ardour/stretch.h"
|
||||
|
||||
#ifdef USE_RUBBERBAND
|
||||
#include "rubberband/RubberBandStretcher.h"
|
||||
#include <rubberband/RubberBandStretcher.h>
|
||||
using namespace RubberBand;
|
||||
#endif
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "region_selection.h"
|
||||
|
||||
#ifdef USE_RUBBERBAND
|
||||
#include "rubberband/RubberBandStretcher.h"
|
||||
#include <rubberband/RubberBandStretcher.h>
|
||||
using namespace RubberBand;
|
||||
#endif
|
||||
|
||||
|
@ -417,11 +417,13 @@ def build(bld):
|
||||
obj.uselib += ' AUDIOUNITS OSX GTKOSX LO '
|
||||
obj.use = [ 'libpbd',
|
||||
'libmidipp',
|
||||
'libtaglib',
|
||||
'ardour',
|
||||
'libardour_cp',
|
||||
'libgtkmm2ext',
|
||||
'libtaglib' ]
|
||||
'libgtkmm2ext']
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
obj.uselib += ' TAGLIB'
|
||||
else:
|
||||
obj.use.append('libtaglib')
|
||||
if sys.platform == 'darwin':
|
||||
obj.use += ' libappleutility'
|
||||
obj.defines = [
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
#include <boost/utility.hpp>
|
||||
#include "vamp-sdk/Plugin.h"
|
||||
#include <vamp-sdk/Plugin.h>
|
||||
#include "ardour/types.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -23,9 +23,9 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "taglib/tag.h"
|
||||
#include "taglib/taglib.h"
|
||||
#include "taglib/xiphcomment.h"
|
||||
#include <taglib/tag.h>
|
||||
#include <taglib/taglib.h>
|
||||
#include <taglib/xiphcomment.h>
|
||||
|
||||
namespace ARDOUR
|
||||
{
|
||||
|
@ -36,6 +36,8 @@
|
||||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#include <ltc.h>
|
||||
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/event_loop.h"
|
||||
#include "pbd/rcu.h"
|
||||
@ -48,7 +50,6 @@
|
||||
#include "midi++/types.h"
|
||||
|
||||
#include "timecode/time.h"
|
||||
#include "ltc/ltc.h"
|
||||
|
||||
#include "ardour/ardour.h"
|
||||
#include "ardour/chan_count.h"
|
||||
|
@ -25,11 +25,11 @@
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#include <jack/jack.h>
|
||||
#include <ltc.h>
|
||||
|
||||
#include "pbd/signals.h"
|
||||
|
||||
#include "timecode/time.h"
|
||||
#include "ltc/ltc.h"
|
||||
|
||||
#include "ardour/types.h"
|
||||
#include "midi++/parser.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "vamp-hostsdk/PluginLoader.h"
|
||||
#include <vamp-hostsdk/PluginLoader.h>
|
||||
|
||||
#include <glibmm/miscutils.h>
|
||||
#include <glibmm/fileutils.h>
|
||||
|
@ -24,12 +24,12 @@
|
||||
|
||||
#include "pbd/convert.h"
|
||||
|
||||
#include "taglib/fileref.h"
|
||||
#include "taglib/flacfile.h"
|
||||
#include "taglib/oggfile.h"
|
||||
#include "taglib/tag.h"
|
||||
#include "taglib/taglib.h"
|
||||
#include "taglib/xiphcomment.h"
|
||||
#include <taglib/fileref.h>
|
||||
#include <taglib/flacfile.h>
|
||||
#include <taglib/oggfile.h>
|
||||
#include <taglib/tag.h>
|
||||
#include <taglib/taglib.h>
|
||||
#include <taglib/xiphcomment.h>
|
||||
|
||||
/* Convert string to TagLib::String */
|
||||
#define TL_STR(string) TagLib::String ((string).c_str(), TagLib::String::UTF8)
|
||||
|
@ -20,8 +20,9 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#include <rubberband/RubberBandStretcher.h>
|
||||
|
||||
#include "pbd/error.h"
|
||||
#include "rubberband/RubberBandStretcher.h"
|
||||
|
||||
#include "ardour/audioregion.h"
|
||||
#include "ardour/audiosource.h"
|
||||
|
@ -333,9 +333,14 @@ def build(bld):
|
||||
obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
|
||||
'SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS',
|
||||
'OSX','BOOST','CURL','DL']
|
||||
obj.use = ['libpbd','libmidipp','libevoral','libvamphost',
|
||||
'libvampplugin','libtaglib','librubberband',
|
||||
obj.use = ['libpbd','libmidipp','libevoral','libvampplugin',
|
||||
'libaudiographer','libltc','libtimecode']
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
obj.uselib.extend(['RUBBERBAND', 'TAGLIB', 'LIBLTC', 'VAMPSDK',
|
||||
'VAMPHOSTSDK'])
|
||||
else:
|
||||
obj.use.extend(['libltc', 'librubberband', 'libtaglib', 'libvamphost'])
|
||||
|
||||
obj.vnum = LIBARDOUR_LIB_VERSION
|
||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
||||
obj.defines = [
|
||||
@ -400,9 +405,13 @@ def build(bld):
|
||||
'test/test_common.cc', 'test/dummy_lxvst.cc', 'test/audio_region_test.cc', 'test/test_util.cc']
|
||||
testcommon.uselib = ['CPPUNIT','SIGCPP','GLIBMM','GTHREAD',
|
||||
'SAMPLERATE','XML','LRDF','COREAUDIO']
|
||||
testcommon.use = ['libpbd','libmidipp','libevoral','libvamphost',
|
||||
'libvampplugin','libtaglib','librubberband',
|
||||
'libaudiographer','libltc','ardour']
|
||||
testcommon.use = ['libpbd','libmidipp','libevoral',
|
||||
'libvampplugin','libaudiographer','ardour']
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
testcommon.uselib.extend(['RUBBERBAND', 'TAGLIB', 'LIBLTC', 'VAMPSDK',
|
||||
'VAMPHOSTSDK'])
|
||||
else:
|
||||
testcommon.use.extend(['libltc', 'librubberband', 'libtaglib', 'libvamphost'])
|
||||
testcommon.defines = [
|
||||
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
||||
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
||||
@ -538,9 +547,15 @@ def create_ardour_test_program(bld, includes, name, target, sources):
|
||||
testobj.source = sources
|
||||
testobj.uselib = ['CPPUNIT','SIGCPP','GLIBMM','GTHREAD',
|
||||
'SAMPLERATE','XML','LRDF','COREAUDIO']
|
||||
testobj.use = ['libpbd','libmidipp','libevoral','libvamphost',
|
||||
'libvampplugin','libtaglib','librubberband',
|
||||
'libaudiographer','libltc','ardour','testcommon']
|
||||
testobj.use = ['libpbd','libmidipp','libevoral','libvampplugin',
|
||||
'libaudiographer','ardour','testcommon']
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
testcommon.uselib.extend(['RUBBERBAND', 'TAGLIB', 'LIBLTC', 'VAMPSDK',
|
||||
'VAMPHOSTSDK'])
|
||||
else:
|
||||
testcommon.use.extend(['libltc', 'librubberband', 'libtaglib',
|
||||
'libvamphost'])
|
||||
|
||||
testobj.name = name
|
||||
testobj.target = target
|
||||
# not sure about install path
|
||||
|
@ -29,10 +29,15 @@ def options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
conf.load('compiler_c')
|
||||
autowaf.configure(conf)
|
||||
if conf.is_defined('USE_EXTERNAL_LIBS'):
|
||||
autowaf.check_pkg(conf, 'ltc', uselib_store='LIBLTC', atleast_version=LIBLTC_LIB_VERSION, mandatory=True)
|
||||
else:
|
||||
conf.load('compiler_c')
|
||||
autowaf.configure(conf)
|
||||
|
||||
def build(bld):
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
return
|
||||
obj = bld(features = 'c cshlib')
|
||||
obj.source = '''
|
||||
ltc.c
|
||||
@ -41,7 +46,7 @@ def build(bld):
|
||||
decoder.c
|
||||
'''
|
||||
|
||||
obj.export_includes = ['.']
|
||||
obj.export_includes = ['./ltc']
|
||||
obj.includes = ['.']
|
||||
obj.name = 'libltc'
|
||||
obj.target = 'ltc'
|
||||
|
@ -24,10 +24,16 @@ def options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
conf.load('compiler_cxx')
|
||||
autowaf.configure(conf)
|
||||
if conf.is_defined('USE_EXTERNAL_LIBS'):
|
||||
autowaf.check_pkg(conf, 'rubberband', uselib_store='RUBBERBAND', atleast_version='1.0', mandatory=True)
|
||||
else:
|
||||
conf.load('compiler_cxx')
|
||||
autowaf.configure(conf)
|
||||
|
||||
def build(bld):
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
return
|
||||
|
||||
# Library
|
||||
obj = bld(features = 'cxx cxxshlib')
|
||||
prefix = 'libs/rubberband/'
|
||||
|
@ -24,10 +24,16 @@ def options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
conf.load('compiler_cxx')
|
||||
autowaf.configure(conf)
|
||||
if conf.is_defined('USE_EXTERNAL_LIBS'):
|
||||
autowaf.check_pkg(conf, 'taglib', uselib_store='TAGLIB', atleast_version="1.4", mandatory=True)
|
||||
else:
|
||||
conf.load('compiler_cxx')
|
||||
autowaf.configure(conf)
|
||||
|
||||
def build(bld):
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
return
|
||||
|
||||
# Library
|
||||
obj = bld(features = 'cxx cxxshlib')
|
||||
sources = bld.path.ant_glob('taglib/*.cpp')
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _AMPLITUDE_FOLLOWER_PLUGIN_H_
|
||||
#define _AMPLITUDE_FOLLOWER_PLUGIN_H_
|
||||
|
||||
#include "vamp-sdk/Plugin.h"
|
||||
#include <vamp-sdk/Plugin.h>
|
||||
|
||||
/**
|
||||
* Example plugin implementing the SuperCollider amplitude follower
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef _ONSET_PLUGIN_H_
|
||||
#define _ONSET_PLUGIN_H_
|
||||
|
||||
#include "vamp-sdk/Plugin.h"
|
||||
#include <vamp-sdk/Plugin.h>
|
||||
#include <aubio/aubio.h>
|
||||
|
||||
class Onset : public Vamp::Plugin
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef _ONSET_DETECT_PLUGIN_H_
|
||||
#define _ONSET_DETECT_PLUGIN_H_
|
||||
|
||||
#include "vamp-sdk/Plugin.h"
|
||||
#include <vamp-sdk/Plugin.h>
|
||||
|
||||
class OnsetDetectorData;
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _PERCUSSION_ONSET_DETECTOR_PLUGIN_H_
|
||||
#define _PERCUSSION_ONSET_DETECTOR_PLUGIN_H_
|
||||
|
||||
#include "vamp-sdk/Plugin.h"
|
||||
#include <vamp-sdk/Plugin.h>
|
||||
|
||||
/**
|
||||
* Example plugin that detects percussive events.
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _SPECTRAL_CENTROID_PLUGIN_H_
|
||||
#define _SPECTRAL_CENTROID_PLUGIN_H_
|
||||
|
||||
#include "vamp-sdk/Plugin.h"
|
||||
#include <vamp-sdk/Plugin.h>
|
||||
|
||||
/**
|
||||
* Example plugin that calculates the centre of gravity of the
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _ZERO_CROSSING_PLUGIN_H_
|
||||
#define _ZERO_CROSSING_PLUGIN_H_
|
||||
|
||||
#include "vamp-sdk/Plugin.h"
|
||||
#include <vamp-sdk/Plugin.h>
|
||||
|
||||
/**
|
||||
* Example plugin that calculates the positions and density of
|
||||
|
@ -38,8 +38,8 @@
|
||||
#include "libvampplugins-config.h"
|
||||
#endif
|
||||
|
||||
#include "vamp/vamp.h"
|
||||
#include "vamp-sdk/PluginAdapter.h"
|
||||
#include <vamp/vamp.h>
|
||||
#include <vamp-sdk/PluginAdapter.h>
|
||||
|
||||
#include "ZeroCrossing.h"
|
||||
#include "SpectralCentroid.h"
|
||||
|
@ -23,13 +23,19 @@ def options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
conf.load('compiler_cxx')
|
||||
autowaf.configure(conf)
|
||||
autowaf.check_pkg(conf, 'fftw3', uselib_store='FFTW3', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True)
|
||||
conf.env.append_value('CXXFLAGS', '-DHAVE_FFTW3')
|
||||
if conf.is_defined('USE_EXTERNAL_LIBS'):
|
||||
autowaf.check_pkg(conf, 'vamp-sdk', uselib_store='VAMPSDK', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'vamp-hostsdk', uselib_store='VAMPHOSTSDK', mandatory=True)
|
||||
else:
|
||||
conf.load('compiler_cxx')
|
||||
autowaf.configure(conf)
|
||||
autowaf.check_pkg(conf, 'fftw3', uselib_store='FFTW3', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True)
|
||||
conf.env.append_value('CXXFLAGS', '-DHAVE_FFTW3')
|
||||
|
||||
def build(bld):
|
||||
if bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
return
|
||||
# Host Library
|
||||
obj = bld(features = 'cxx cxxshlib')
|
||||
obj.source = '''
|
||||
|
17
wscript
17
wscript
@ -428,6 +428,8 @@ def options(opt):
|
||||
help='Build internal libs as shared libraries')
|
||||
opt.add_option('--internal-static-libs', action='store_false', dest='internal_shared_libs',
|
||||
help='Build internal libs as static libraries')
|
||||
opt.add_option('--use-external-libs', action='store_true', default=False, dest='use_external_libs',
|
||||
help='Use external/system versions of some bundled libraries')
|
||||
opt.add_option('--lv2', action='store_true', default=True, dest='lv2',
|
||||
help='Compile with support for LV2 (if Lilv+Suil is available)')
|
||||
opt.add_option('--no-lv2', action='store_false', dest='lv2',
|
||||
@ -600,6 +602,9 @@ def configure(conf):
|
||||
if Options.options.internal_shared_libs:
|
||||
conf.define('INTERNAL_SHARED_LIBS', 1)
|
||||
|
||||
if Options.options.use_external_libs:
|
||||
conf.define('USE_EXTERNAL_LIBS', 1)
|
||||
|
||||
if Options.options.boost_include != '':
|
||||
conf.env.append_value('CXXFLAGS', '-I' + Options.options.boost_include)
|
||||
|
||||
@ -700,6 +705,7 @@ const char* const ardour_config_info = "\\n\\
|
||||
write_config_text('Install prefix', conf.env['PREFIX'])
|
||||
write_config_text('Strict compiler flags', conf.env['STRICT'])
|
||||
write_config_text('Internal Shared Libraries', conf.is_defined('INTERNAL_SHARED_LIBS'))
|
||||
write_config_text('Use External Libraries', conf.is_defined('USE_EXTERNAL_LIBS'))
|
||||
|
||||
write_config_text('Architecture flags', opts.arch)
|
||||
write_config_text('Aubio', conf.is_defined('HAVE_AUBIO'))
|
||||
@ -745,14 +751,17 @@ def build(bld):
|
||||
# add directories that contain only headers, to workaround an issue with waf
|
||||
|
||||
bld.path.find_dir ('libs/evoral/evoral')
|
||||
bld.path.find_dir ('libs/vamp-sdk/vamp-sdk')
|
||||
if not bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
bld.path.find_dir ('libs/vamp-sdk/vamp-sdk')
|
||||
bld.path.find_dir ('libs/surfaces/control_protocol/control_protocol')
|
||||
bld.path.find_dir ('libs/timecode/timecode')
|
||||
bld.path.find_dir ('libs/libltc/ltc')
|
||||
bld.path.find_dir ('libs/rubberband/rubberband')
|
||||
if not bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
bld.path.find_dir ('libs/libltc/ltc')
|
||||
bld.path.find_dir ('libs/rubberband/rubberband')
|
||||
bld.path.find_dir ('libs/gtkmm2ext/gtkmm2ext')
|
||||
bld.path.find_dir ('libs/ardour/ardour')
|
||||
bld.path.find_dir ('libs/taglib/taglib')
|
||||
if not bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
bld.path.find_dir ('libs/taglib/taglib')
|
||||
bld.path.find_dir ('libs/pbd/pbd')
|
||||
|
||||
autowaf.set_recursive()
|
||||
|
Loading…
Reference in New Issue
Block a user