merge and resolve conflict with master
[ardour.git] / libs / vamp-plugins / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 import os
4
5 # Version of this package (even if built as a child)
6 LIBARDOURVAMPPLUGINS_VERSION = '0.0.0'
7
8 # Library version (UNIX style major, minor, micro)
9 # major increment <=> incompatible changes
10 # minor increment <=> compatible changes (additions)
11 # micro increment <=> no interface changes
12 LIBARDOURVAMPPLUGINS_LIB_VERSION = '0.0.0'
13
14 # Variables for 'waf dist'
15 APPNAME = 'libardourvampplugins'
16 VERSION = LIBARDOURVAMPPLUGINS_VERSION
17
18 # Mandatory variables
19 top = '.'
20 out = 'build'
21
22 def options(opt):
23     autowaf.set_options(opt)
24
25 def configure(conf):
26     conf.load('compiler_cxx')
27     autowaf.configure(conf)
28     autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True)
29     autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', mandatory=False)
30     conf.write_config_header('libvampplugins-config.h', remove=False)
31
32 def build(bld):
33     # Library
34     obj = bld(features = 'cxx cxxshlib')
35     obj.source = '''
36             plugins.cpp
37             AmplitudeFollower.cpp
38             OnsetDetect.cpp
39             PercussionOnsetDetector.cpp
40             SpectralCentroid.cpp
41             ZeroCrossing.cpp
42     '''
43     obj.export_includes = ['.']
44     obj.includes     = ['.']
45     obj.name         = 'libardourvampplugins'
46     obj.target       = 'ardourvampplugins'
47     obj.uselib       = 'FFTW3F'
48     obj.use          = 'libvampplugin libqmdsp'
49     if bld.is_defined('HAVE_AUBIO'):
50         obj.source += ' Onset.cpp '
51         obj.uselib += ' AUBIO '
52     obj.vnum         = LIBARDOURVAMPPLUGINS_LIB_VERSION
53     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'vamp')
54
55 def shutdown():
56     autowaf.shutdown()