diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2020-01-17 07:53:43 +0300 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2020-01-30 13:57:00 +0300 |
commit | 1b84dd1f6b6917630a2219bc09482d05f1fc5b8e (patch) | |
tree | e70fe129f795f06c176f583541e35080fc31c98c /cargo_wrapper.py | |
parent | a43ad8f2dd93abb1ae88c4f0b2e8a77b1f1fc0e4 (diff) |
meson: add sodium option
Allow us to pick between the built-in libsodium, use the one from the
system or disable the plugin.
Diffstat (limited to 'cargo_wrapper.py')
-rw-r--r-- | cargo_wrapper.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cargo_wrapper.py b/cargo_wrapper.py index c8b143094..0d208dee5 100644 --- a/cargo_wrapper.py +++ b/cargo_wrapper.py @@ -7,8 +7,8 @@ import shutil import subprocess import sys -command, meson_build_dir, meson_current_source_dir, meson_build_root, target, exclude = sys.argv[ - 1:7] +command, meson_build_dir, meson_current_source_dir, meson_build_root, target, exclude, extra_env = sys.argv[ + 1:8] cargo_target_dir = os.path.join(meson_build_dir, 'target') @@ -26,9 +26,14 @@ pkg_config_path.append(os.path.join( meson_build_root, 'subprojects', 'gst-plugins-base', 'pkgconfig')) env['PKG_CONFIG_PATH'] = ':'.join(pkg_config_path) +if len(extra_env) > 0: + for e in extra_env.split(','): + k, v = e.split(':') + env[k] = v + if command == 'build': # cargo build - ext = sys.argv[7] + ext = sys.argv[8] cargo_cmd = ['cargo', 'build', '--all-targets', '--manifest-path', os.path.join( meson_current_source_dir, 'Cargo.toml'), |