[Scons-users] library copy

Philipp Kraus philipp.kraus at flashpixx.de
Fri Sep 21 18:38:27 EDT 2012


On 2012-09-20 17:49:06 +0200, Kraus Philipp said:


> Hello,

>

> I build a C++ program with env.Program and run first Configuration for

> detecting header & libraries. The executable is build under

> #build/release or #build/debug.

> I use some static and some dynamic libs. After the build process I

> would like to copy the shared libraries to the build directory. Can I

> read the full path of the shared library, which

> is linked to my executable or need I use FindFiles on env["libpath"] ?



I have written a shot builder with this main call:

Builder( action = Copy("TARGET", "$SOURCE"), emitter =
LibraryCopy_emitter, single_source = False, target_factory=Value,
source_factory=File )

I use it with
env.LibraryCopy( "targetdirectory/", ["file1", "file2", ...] )

The emitter creates the correct source and target list, but I have got
a little problem with the action and the factories. I think the
target_factory must be a Dir,
but if I set it to Dir, I'll get a type error, that a file is expected,
if I set it to File, I'll get that env.LibraryCopy a dir is set. With
Value there is no error, but the
copy action is not used.

The emitter scans the source file list and returns a target file list
with the sources and the targetdirectory, I will copy the files, that
are set in the second parameter
to the target directory with is set in the first parameter without any
renaming or anything else

Do you have any idea which parameter must be set to the Builder call?

Phil




More information about the Scons-users mailing list