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.
This commit is contained in:
Guillaume Desmottes 2021-04-16 13:21:38 +02:00
parent f95b5ee666
commit 70d3eecbc5

View file

@ -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