diff options
author | David Robillard <d@drobilla.net> | 2011-02-12 04:06:07 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-12 04:06:07 +0000 |
commit | 4d75c4711b12747e37286f5c3cc5bf741d7b351e (patch) | |
tree | bdd66aab3bd5fcc006745c9bbfeffe94ae65da0e | |
parent | 0c0d8887ea8609028cb465e87c3cb3f0b1d8c601 (diff) | |
download | lilv-4d75c4711b12747e37286f5c3cc5bf741d7b351e.tar.gz lilv-4d75c4711b12747e37286f5c3cc5bf741d7b351e.tar.bz2 lilv-4d75c4711b12747e37286f5c3cc5bf741d7b351e.zip |
Improve default LV2_PATH code.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2929 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | wscript | 35 |
1 files changed, 24 insertions, 11 deletions
@@ -77,14 +77,34 @@ def configure(conf): if Options.options.dyn_manifest: autowaf.define(conf, 'SLV2_DYN_MANIFEST', 1) + slv2_path_sep = ':' + slv2_dir_sep = '/' + if sys.platform == 'win32': + slv2_path_sep = ';' + slv2_dir_sep = '\\' + + autowaf.define(conf, 'SLV2_PATH_SEP', slv2_path_sep) + autowaf.define(conf, 'SLV2_DIR_SEP', slv2_dir_sep) + if Options.options.default_lv2_path == '': if Options.platform == 'darwin': - Options.options.default_lv2_path = "~/Library/Audio/Plug-Ins/LV2:/Library/Audio/Plug-Ins/LV2:~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2" + Options.options.default_lv2_path = slv2_path_sep.join([ + '~/Library/Audio/Plug-Ins/LV2', + '~/.lv2', + '/usr/local/lib/lv2', + '/usr/lib/lv2', + '/Library/Audio/Plug-Ins/LV2']) elif Options.platform == 'haiku': - Options.options.default_lv2_path = "~/.lv2:/boot/common/add-ons/lv2" + Options.options.default_lv2_path = slv2_path_sep.join([ + '~/.lv2', + '/boot/common/add-ons/lv2']) + elif Options.platform == 'win32': + Options.options.default_lv2_path = 'C:\\Program Files\\LV2' else: - Options.options.default_lv2_path = "~/.lv2:/usr/%s/lv2:/usr/local/%s/lv2" % ( - conf.env['LIBDIRNAME'], conf.env['LIBDIRNAME']) + Options.options.default_lv2_path = slv2_path_sep.join([ + '~/.lv2', + '/usr/%s/lv2' % conf.env['LIBDIRNAME'], + '/usr/local/%s/lv2' % conf.env['LIBDIRNAME']]) conf.env['USE_JACK'] = conf.env['HAVE_JACK'] and not Options.options.no_jack conf.env['BUILD_TESTS'] = Options.options.build_tests @@ -92,13 +112,6 @@ def configure(conf): conf.env['BASH_COMPLETION'] = Options.options.bash_completion autowaf.define(conf, 'SLV2_DEFAULT_LV2_PATH', Options.options.default_lv2_path) - if sys.platform == 'win32': - autowaf.define(conf, 'SLV2_PATH_SEP', ';') - autowaf.define(conf, 'SLV2_DIR_SEP', '\\') - else: - autowaf.define(conf, 'SLV2_PATH_SEP', ':') - autowaf.define(conf, 'SLV2_DIR_SEP', '/') - if conf.env['USE_JACK']: autowaf.check_header(conf, 'lv2/lv2plug.in/ns/ext/event/event.h', 'HAVE_LV2_EVENT') autowaf.check_header(conf, 'lv2/lv2plug.in/ns/ext/uri-map/uri-map.h', 'HAVE_LV2_URI_MAP') |