[Scons-users] Shared library in bin subdirectory
LRN
lrn1986 at gmail.com
Thu Dec 27 03:28:42 EST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 26.12.2012 22:47, Bill Deegan wrote:
> On Wed, Dec 26, 2012 at 8:05 AM, LRN wrote:
>
>> Here's what i do:
>>
>> prefix = ARGUMENTS.get ('prefix', None) destdir = ARGUMENTS.get
>> ('destdir', None) if prefix == None: prefix = '/usr/local'
>>
>> foo = env.SharedLibrary (target = "foo", source = ["foo.c"],
>> SHLIBPREFIX = 'lib', LIBSUFFIX='.dll.a') if destdir is not None:
>> destprefix = destdir + prefix env.Install (os.path.join
>> (destprefix, 'bin'), [foo]) env.Alias('install', destprefix)
>>
>> And when i do `scons prefix=/ destdir=c:/bar install', i end up
>> having libfoo.dll.a import library in c:/bar/bin/ directory
>> instead of c:/bar/lib. How do i make SharedLibrary or Install put
>> the import library into /lib subdirectory?
>>
>
> Here's your problem: env.Install (os.path.join (destprefix, 'bin'),
> [foo])
>
> Change 'bin' to 'lib'...
Thank you for your quick response.
I've tried that, and it works - libfoo.dll.a is installed into /lib
subdir!
However, a completely unrelated problem has cropped up:
Now when i do `scons prefix=/ destdir=c:/bar install', i end up having
libfoo.dll shared library in c:/bar/lib/ directory instead of
c:/bar/bin. How do i make SharedLibrary or Install put the shared
library into /bin subdirectory?
P.S. May i suggest that you configure your e-mail client to not to
specify plaintext e-mail addresses in the "On $date at $time, $user
wrote:" line?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEcBAEBAgAGBQJQ3AauAAoJEOs4Jb6SI2CwAXwIAL6CJb56WZVnJVv6hubWEEdQ
1gSZ5jFFvh0nIKNVl8i4LFqzV82QBeWXFw/dCIO6GdSZ52Tohs2tadDOolNupxFN
YRK9hy5ZWJvzsbDwQtpjXfkRHg/+uj30SLrHIPOFLn1UHLCSGS6mrwdxsXuYsugF
p5LG36T2/AEn+NDL1eXNETACzzcN6/iZmfncAJ8TssKHMU7T+/cIHFrb6irEz5BZ
Irp6tWtriOO2ac8RrXW3+xjtULECQ9lSkWlDm0HaZdELmw3DzaEgUYLtqPhXIzX3
XfMFu20H1l+k44Y3leSbkv3+SIJ345d0iPcLR7earel1j5ecC30nSYZqgyxFwiU=
=Xj0X
-----END PGP SIGNATURE-----
More information about the Scons-users
mailing list