Add API allowing plugin preset load to affect automation
[ardour.git] / libs / qm-dsp / 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 QM_DSP_VERSION = '1.7.1'
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 QM_DSP_LIB_VERSION = '1.7.1'
13
14 # Variables for 'waf dist'
15 APPNAME = 'qm-dsp'
16 VERSION = QM_DSP_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     if conf.is_defined('USE_EXTERNAL_LIBS'):
27         conf.check_cxx(header_name="base/Pitch.h", mandatory=True)
28         conf.check_cxx(lib="qm-dsp", uselib_store="QMDSP", 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     # Host Library
38     obj = bld(features = 'c cxx cxxstlib')
39     obj.source = '''
40             base/Pitch.cpp
41             base/KaiserWindow.cpp
42             base/SincWindow.cpp
43             dsp/chromagram/Chromagram.cpp
44             dsp/chromagram/ConstantQ.cpp
45             dsp/keydetection/GetKeyMode.cpp
46             dsp/mfcc/MFCC.cpp
47             dsp/onsets/DetectionFunction.cpp
48             dsp/onsets/PeakPicking.cpp
49             dsp/phasevocoder/PhaseVocoder.cpp
50             dsp/rateconversion/Decimator.cpp
51             dsp/rateconversion/DecimatorB.cpp
52             dsp/rhythm/BeatSpectrum.cpp
53             dsp/signalconditioning/DFProcess.cpp
54             dsp/signalconditioning/Filter.cpp
55             dsp/signalconditioning/FiltFilt.cpp
56             dsp/signalconditioning/Framer.cpp
57             dsp/tempotracking/DownBeat.cpp
58             dsp/tempotracking/TempoTrack.cpp
59             dsp/tempotracking/TempoTrackV2.cpp
60             dsp/tonal/ChangeDetectionFunction.cpp
61             dsp/tonal/TCSgram.cpp
62             dsp/tonal/TonalEstimator.cpp
63             dsp/transforms/FFT.cpp
64             dsp/wavelet/Wavelet.cpp
65             maths/Correlation.cpp
66             maths/CosineDistance.cpp
67             maths/KLDivergence.cpp
68             maths/MathUtilities.cpp
69             maths/pca/pca.c
70             ext/kissfft/kiss_fft.c
71             ext/kissfft/tools/kiss_fftr.c
72     '''
73     autowaf.ensure_visible_symbols (obj, False)
74     obj.export_includes = ['.']
75     obj.includes     = ['.', 'ext/kissfft', 'ext/kissfft/tools/']
76     obj.defines      = ['kiss_fft_scalar=double']
77     obj.name         = 'libqm-dsp'
78     obj.target       = 'qm-dsp'
79     obj.vnum         = QM_DSP_VERSION
80     obj.install_path = bld.env['LIBDIR']
81     if bld.env['build_target'] != 'mingw':
82         obj.cxxflags += [ '-fPIC' ]
83         obj.cflags   += [ '-fPIC' ]
84
85 def shutdown():
86     autowaf.shutdown()