From e082c29598ad3185bf2ce180f4b34377c3d3a76f Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 27 Nov 2023 20:55:30 +0100 Subject: [PATCH] Fix library copy command Use InstallAs with the correct target/source order instead of Command. --- SConstruct | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/SConstruct b/SConstruct index be5445b..75c2372 100644 --- a/SConstruct +++ b/SConstruct @@ -65,16 +65,7 @@ library = env.SharedLibrary( source=sources, ) - -def copy_bin_to_projectdir(target, source, env): - import shutil - - targetfrom = "bin/{}/lib{}".format(env["platform"], file) - targetdest = "{}/bin/{}/lib{}".format(projectdir, env["platform"], file) - shutil.copyfile(targetfrom, targetdest) - - -copy = env.Command(libraryfile, None, copy_bin_to_projectdir) +copy = env.InstallAs("{}/bin/{}/lib{}".format(projectdir, env["platform"], file), library) default_args = [library, copy] if localEnv.get("compiledb", False):