aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-08 05:18:10 +0000
committerDavid Robillard <d@drobilla.net>2012-02-08 05:18:10 +0000
commit1ff807773c014b969c2f2dfad0b5a82cd0ee55d8 (patch)
treeadf953544ee8347a69dd9aa146883874edb0e6ba
parent1f8a65dc5a5b151bd82e92830a59d2e82f9d8b15 (diff)
downloadlv2-1ff807773c014b969c2f2dfad0b5a82cd0ee55d8.tar.xz
Build example plugins as part of whole tree build (against included headers).
-rw-r--r--plugins/eg-amp.lv2/wscript13
-rw-r--r--plugins/eg-sampler.lv2/wscript26
-rw-r--r--wscript2
3 files changed, 28 insertions, 13 deletions
diff --git a/plugins/eg-amp.lv2/wscript b/plugins/eg-amp.lv2/wscript
index 8c44d61..dcf3f9d 100644
--- a/plugins/eg-amp.lv2/wscript
+++ b/plugins/eg-amp.lv2/wscript
@@ -22,7 +22,8 @@ def configure(conf):
autowaf.configure(conf)
autowaf.display_header('Amp Configuration')
- autowaf.check_pkg(conf, 'lv2core', uselib_store='LV2CORE')
+ if not autowaf.is_child():
+ autowaf.check_pkg(conf, 'lv2core', uselib_store='LV2CORE')
conf.env.append_value('CFLAGS', '-std=c99')
@@ -33,8 +34,7 @@ def configure(conf):
conf.env['pluginlib_PATTERN'] = pat
conf.env['pluginlib_EXT'] = pat[pat.rfind('.'):]
- autowaf.display_msg(conf, "LV2 bundle directory",
- conf.env['LV2DIR'])
+ autowaf.display_msg(conf, "LV2 bundle directory", conf.env['LV2DIR'])
print('')
def build(bld):
@@ -53,6 +53,10 @@ def build(bld):
penv = bld.env.derive()
penv['cshlib_PATTERN'] = bld.env['pluginlib_PATTERN']
+ include = None
+ if autowaf.is_child:
+ include = '../..'
+
# Build plugin library
obj = bld(features = 'c cshlib',
env = penv,
@@ -60,5 +64,6 @@ def build(bld):
name = 'amp',
target = '%s/amp' % bundle,
install_path = '${LV2DIR}/%s' % bundle,
- uselib = 'LV2CORE')
+ uselib = 'LV2CORE',
+ include = include)
diff --git a/plugins/eg-sampler.lv2/wscript b/plugins/eg-sampler.lv2/wscript
index 0e93cf3..fae6eff 100644
--- a/plugins/eg-sampler.lv2/wscript
+++ b/plugins/eg-sampler.lv2/wscript
@@ -22,13 +22,15 @@ def configure(conf):
autowaf.configure(conf)
autowaf.display_header('Sampler Configuration')
- autowaf.check_pkg(conf, 'lv2core', uselib_store='LV2CORE')
- autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-urid',
- uselib_store='LV2_URID')
- autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-atom',
- uselib_store='LV2_ATOM')
- autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-state',
- uselib_store='LV2_STATE')
+ if not autowaf.is_child():
+ autowaf.check_pkg(conf, 'lv2core', uselib_store='LV2CORE')
+ autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-urid',
+ uselib_store='LV2_URID')
+ autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-atom',
+ uselib_store='LV2_ATOM')
+ autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-state',
+ uselib_store='LV2_STATE')
+
autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE',
atleast_version='1.0.0', mandatory=True)
autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2',
@@ -63,6 +65,10 @@ def build(bld):
penv = bld.env.derive()
penv['cshlib_PATTERN'] = bld.env['pluginlib_PATTERN']
+ include = None
+ if autowaf.is_child:
+ include = '../..'
+
# Build plugin library
obj = bld(features = 'c cshlib',
env = penv,
@@ -70,7 +76,8 @@ def build(bld):
name = 'sampler',
target = '%s/sampler' % bundle,
install_path = '${LV2DIR}/%s' % bundle,
- use = 'SNDFILE')
+ use = 'SNDFILE',
+ include = include)
# Build UI library
if bld.is_defined('HAVE_GTK2'):
@@ -80,5 +87,6 @@ def build(bld):
name = 'sampler_ui',
target = '%s/sampler_ui' % bundle,
install_path = '${LV2DIR}/%s' % bundle,
- use = 'GTK2')
+ use = 'GTK2',
+ include = include)
diff --git a/wscript b/wscript
index f4db842..80959d4 100644
--- a/wscript
+++ b/wscript
@@ -38,12 +38,14 @@ def configure(conf):
conf.load('compiler_cc')
conf.load('compiler_cxx')
autowaf.configure(conf)
+ autowaf.set_recursive()
conf.env.append_unique('CFLAGS', '-std=c99')
subdirs = ['lv2/lv2plug.in/ns/lv2core']
subdirs += glob.glob('lv2/lv2plug.in/ns/ext/*/')
subdirs += glob.glob('lv2/lv2plug.in/ns/extensions/*/')
+ subdirs += glob.glob('plugins/*/')
for i in subdirs:
conf.recurse(i)