Merge pull request #21 from Faless/fix/install_bin
Fix library copy command
This commit is contained in:
		
						commit
						682db5ae1a
					
				
							
								
								
									
										11
									
								
								SConstruct
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								SConstruct
									
									
									
									
									
								
							| 
						 | 
					@ -65,16 +65,7 @@ library = env.SharedLibrary(
 | 
				
			||||||
    source=sources,
 | 
					    source=sources,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					copy = env.InstallAs("{}/bin/{}/lib{}".format(projectdir, env["platform"], file), library)
 | 
				
			||||||
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)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
default_args = [library, copy]
 | 
					default_args = [library, copy]
 | 
				
			||||||
if localEnv.get("compiledb", False):
 | 
					if localEnv.get("compiledb", False):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue