detect VST >= 2.4 plugins.
[ardour.git] / libs / rubberband / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 import os
4 import glob
5
6 # Version of this package (even if built as a child)
7 LIBRUBBERBAND_VERSION = '0.0.0'
8
9 # Library version (UNIX style major, minor, micro)
10 # major increment <=> incompatible changes
11 # minor increment <=> compatible changes (additions)
12 # micro increment <=> no interface changes
13 LIBRUBBERBAND_LIB_VERSION = '4.1.0'
14
15 # Variables for 'waf dist'
16 APPNAME = 'librubberband'
17 VERSION = LIBRUBBERBAND_VERSION
18
19 # Mandatory variables
20 top = '.'
21 out = 'build'
22
23 def options(opt):
24     autowaf.set_options(opt)
25
26 def configure(conf):
27     if conf.is_defined('USE_EXTERNAL_LIBS'):
28         autowaf.check_pkg(conf, 'rubberband', uselib_store='RUBBERBAND', atleast_version='1.0', mandatory=True)
29     else:
30         conf.load('compiler_cxx')
31         autowaf.configure(conf)
32
33 def build(bld):
34     if bld.is_defined('USE_EXTERNAL_LIBS'):
35         return
36
37     # Library
38     obj = bld(features = 'cxx cxxshlib')
39     prefix = 'libs/rubberband/'
40     sources = glob.glob(prefix + 'src/*.cpp')
41     obj.source = [ ]
42     for i in sources:
43         obj.source += [ i.replace(prefix, '') ]
44     obj.export_includes = ['.']
45     obj.includes     = ['.', 'rubberband']
46     obj.name         = 'librubberband'
47     obj.target       = 'rubberband'
48     obj.uselib       = 'FFTW3 FFTW3F SAMPLERATE SNDFILE'
49     obj.use          = 'libvamphost'
50     obj.vnum         = LIBRUBBERBAND_LIB_VERSION
51     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
52     obj.cxxflags     = '-DPACKAGE="librubberband"'
53
54 def shutdown():
55     autowaf.shutdown()