diff options
author | Guillaume Desmottes <guillaume@desmottes.be> | 2021-09-22 09:57:42 +0300 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2021-10-19 10:49:22 +0300 |
commit | acce0ab4fc73063a4109ddd31826b10161f03f5d (patch) | |
tree | 3b0a5afe11f981f47d3db63b4b45f025514e5a1a /cargo_wrapper.py | |
parent | 97f45a0f77a3ad741b30b5f0cd1304191eced285 (diff) |
meson: build all workspaces all together
It's now possible thanks to cargo-c 0.9.3. Should reduce build time of
all plugins.
Fix #165
Diffstat (limited to 'cargo_wrapper.py')
-rw-r--r-- | cargo_wrapper.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/cargo_wrapper.py b/cargo_wrapper.py index 63f61c532..fd86521eb 100644 --- a/cargo_wrapper.py +++ b/cargo_wrapper.py @@ -9,8 +9,9 @@ import sys PLUGIN_DIRS = ['audio', 'generic', 'net', 'text', 'utils', 'video'] -command, meson_build_dir, meson_current_source_dir, meson_build_root, target, exclude, extra_env, prefix, libdir = sys.argv[ +command, meson_build_dir, meson_current_source_dir, meson_build_root, target, include, extra_env, prefix, libdir = sys.argv[ 1:10] +include = include.split(',') cargo_target_dir = os.path.join(meson_build_dir, 'target') @@ -57,15 +58,9 @@ def run(cargo_cmd, env): sys.exit(1) -for d in PLUGIN_DIRS: - for name in os.listdir(os.path.join(meson_current_source_dir, d)): - if '{}/{}'.format(d, name) in exclude: - continue - - cargo_toml = os.path.join( - meson_current_source_dir, d, name, 'Cargo.toml') - cmd = cargo_cmd + ['--manifest-path', cargo_toml] - run(cmd, env) +for p in include: + cargo_cmd.extend(['-p', p]) +run(cargo_cmd, env) if command == 'build': target_dir = os.path.join(cargo_target_dir, '**', target) |