better error message if VST SDK is not installed and neeed
[ardour.git] / libs / fst / SConscript
1 # -*- python -*-
2
3 import os
4 import os.path
5 import sys
6 import glob
7
8 fst_src = glob.glob('*.c')
9
10 Import('env install_prefix')
11 fst = env.Copy(CC="winegcc")
12 fst.Append (CPPPATH=".")
13
14 hackSDK = fst.Command('vst/aeffectx.h', 'vstsdk2.3/source/common/aeffectx.h', [
15     Delete ('${TARGET.dir}'),
16     Copy ('${TARGET.dir}', '${SOURCE.dir}'),
17     "sed -i '/struct VstFileType\|struct VstFileSelect/,/};/d' $TARGET"
18 ])
19
20 a = fst.Object ('fst', 'fst.c')
21 b = fst.Object ('fstinfofile', 'fstinfofile.c')
22 c = fst.Object ('vstwin', 'vstwin.c')
23 d = fst.Object ('vsti', 'vsti.c')
24
25 if fst['VST']:
26     if os.access ('vst/aeffectx.h', os.F_OK):
27         Default([hackSDK,a,b,c,d])
28     else:
29         print 'You have not installed the VST SDK in the correct location.'
30         print 'Please see http://ardour.org/building_vst_support for more information'
31         sys.exit (1)
32     
33 env.Alias('tarball', env.Distribute (env['DISTTREE'],
34                                      fst_src + ['SConscript',
35                                                 'fst.h',
36                                                 'jackvst.h'
37                                                 ] ))
38