13
0
livetrax/libs/vamp-plugins/wscript
Robin Gareus f3d858f9df fix detection of aubio library - aubio-0.4 breaks API and ABI.
ideally we'll want atleast_version='0.3.2', max_version='0.3.9'
(or anything before 0.4.0) for the time being.
but waf/autowaf don't seem to allow that.

aubio-0.3.2 was the previous minimum requirement and is
also the last release of audio-0.3.X, so we're good with
exact_version for now.
2014-01-04 19:28:15 +01:00

58 lines
1.7 KiB
Python

#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
# 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
top = '.'
out = 'build'
def options(opt):
autowaf.set_options(opt)
def configure(conf):
conf.load('compiler_cxx')
autowaf.configure(conf)
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True)
autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', mandatory=False,
exact_version='0.3.2')
conf.write_config_header('libvampplugins-config.h', remove=False)
def build(bld):
# Library
obj = bld(features = 'cxx cxxshlib')
obj.source = '''
plugins.cpp
AmplitudeFollower.cpp
OnsetDetect.cpp
PercussionOnsetDetector.cpp
SpectralCentroid.cpp
ZeroCrossing.cpp
'''
obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libardourvampplugins'
obj.target = 'ardourvampplugins'
obj.uselib = 'FFTW3F'
obj.use = 'libvampplugin libqmdsp'
if bld.is_defined('HAVE_AUBIO'):
obj.source += ' Onset.cpp '
obj.uselib += ' AUBIO '
obj.vnum = LIBARDOURVAMPPLUGINS_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'vamp')
def shutdown():
autowaf.shutdown()