summaryrefslogtreecommitdiff
path: root/gtk2_ardour/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-11 21:55:11 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-11 21:55:11 +0000
commit6f5ee7c4293c43486d48bac00fdcdba90dabb17d (patch)
tree9468080d65f78d36c187403e581ccdd17a07be40 /gtk2_ardour/wscript
parent2578d5da0ef6e7256d25fc737a53bb0294bc19a3 (diff)
Fix up VST build and add basic support for VSTi
git-svn-id: svn://localhost/ardour2/branches/3.0@7403 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/wscript')
-rw-r--r--gtk2_ardour/wscript42
1 files changed, 38 insertions, 4 deletions
diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript
index ddae851127..940d43d5b4 100644
--- a/gtk2_ardour/wscript
+++ b/gtk2_ardour/wscript
@@ -237,13 +237,29 @@ def configure(conf):
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
+# Add a waf `feature' to allow compilation of things using winegcc
+from TaskGen import feature
+@feature("wine")
+def set_winegcc(self):
+ self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
+ self.env.CC = 'winegcc'
+
def build(bld):
- # Program
- obj = bld.new_task_gen(features = 'cxx cc cprogram')
+ # GTK front-end; if we're using VST we build this as a shared library, otherwise
+ # it's a normal executabale
+ if bld.env['VST_SUPPORT']:
+ obj = bld.new_task_gen(features = 'cxx cc cshlib')
+ else:
+ obj = bld.new_task_gen(features = 'cxx cc cprogram')
+
obj.includes = ['.']
obj.source = gtk2_ardour_sources
obj.name = 'gtk2_ardour'
- obj.target = 'ardour-3.0'
+ if bld.env['VST_SUPPORT']:
+ obj.target = 'gtk2_ardour'
+ obj.includes += ['../libs/fst']
+ else:
+ obj.target = 'ardour-3.0'
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.uselib = 'UUID FLAC GLIBMM GTHREAD GTK GNOMECANVAS OGG ALSA'
obj.uselib += ' GTKMM GNOMECANVASMM OSX GTKOSX COREAUDIO'
@@ -266,7 +282,7 @@ def build(bld):
if bld.env['FREESOUND']:
obj.source += [ 'sfdb_freesound_mootcher.cc' ]
- if bld.env['VST']:
+ if bld.env['VST_SUPPORT']:
obj.source += [ 'vst_pluginui.cc' ]
obj.cxxflags += [ '-DVST_SUPPORT' ]
@@ -281,6 +297,24 @@ def build(bld):
else:
obj.source += [ 'x11.cc' ]
+ if bld.env['VST_SUPPORT']:
+ # If we require VST support we build a stub main() and the FST library here using
+ # winegcc, and link it to the GTK front-end library
+ obj = bld.new_task_gen (features = 'cxx cc cprogram wine')
+ obj.source = '''
+ ../libs/fst/fst.c
+ ../libs/fst/fstinfofile.c
+ ../libs/fst/vsti.c
+ ../libs/fst/vstwin.c
+ ../vst/winmain.c
+ '''
+ obj.includes = '../libs/fst'
+ obj.target = 'ardour-3.0-vst'
+ obj.linkflags = ['-mwindows', '-Wl,--export-dynamic']
+ obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
+ obj.uselib = 'ALSA'
+ obj.uselib_local = '''libpbd libmidipp libtaglib libardour libardour_cp libgtkmm2ext libtaglib gtk2_ardour'''
+
# Wrappers
wrapper_subst_dict = {