From 70d3eecbc58d37c7a799adbc3bb728f2950edf06 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 16 Apr 2021 13:21:38 +0200 Subject: [PATCH] meson: fix copy of build artifacts Latest version of cargo-c and cargo are now producing files to 'build/target/x86_64-unknown-linux-gnu/debug/' instead of 'build/target/debug/'. Fix this by making the glob pattern recursive. --- cargo_wrapper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cargo_wrapper.py b/cargo_wrapper.py index 06bbde90..63f61c53 100644 --- a/cargo_wrapper.py +++ b/cargo_wrapper.py @@ -68,14 +68,15 @@ for d in PLUGIN_DIRS: run(cmd, env) if command == 'build': + target_dir = os.path.join(cargo_target_dir, '**', target) # Copy so files to build dir - for f in glob.glob(os.path.join(cargo_target_dir, target, '*.' + ext)): + for f in glob.glob(os.path.join(target_dir, '*.' + ext), recursive=True): shutil.copy(f, meson_build_dir) if ext2: - for f in glob.glob(os.path.join(cargo_target_dir, target, '*.' + ext2)): + for f in glob.glob(os.path.join(target_dir, '*.' + ext2), recursive=True): shutil.copy(f, meson_build_dir) # Copy generated pkg-config files - for f in glob.glob(os.path.join(cargo_target_dir, target, '*.pc')): + for f in glob.glob(os.path.join(target_dir, '*.pc'), recursive=True): shutil.copy(f, meson_build_dir) # Move -uninstalled.pc to meson-uninstalled