summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-11-03 16:22:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-11-03 16:35:21 (GMT)
commit2b65c91bcd2367f816658c82fc230e881bcb1084 (patch)
tree210fd239ce980a747efa3b423e5fa6176fe55243 /Swiften/SConscript
parentb9e7c0033eb36ab1d24183be95d898f94cc487af (diff)
downloadswift-contrib-2b65c91bcd2367f816658c82fc230e881bcb1084.zip
swift-contrib-2b65c91bcd2367f816658c82fc230e881bcb1084.tar.bz2
Build 3rdParty libraries with SwiftenObject.
This ensures that they can be linked when building Swiften in DLL mode. Change-Id: I8a4ff9dab6003e60fab21aba2bbb4beccb26bef6
Diffstat (limited to 'Swiften/SConscript')
-rw-r--r--Swiften/SConscript7
1 files changed, 5 insertions, 2 deletions
diff --git a/Swiften/SConscript b/Swiften/SConscript
index db18cc3..2111d26 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -35,6 +35,11 @@ if env["SCONS_STAGE"] == "flags" :
env["SWIFTEN_LIBRARY_FILE"] = env.subst("libSwiften.so.${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}")
env["SWIFTEN_LIBRARY_ALIASES"] = ["libSwiften.so", env.subst("libSwiften.so.${SWIFTEN_VERSION_MAJOR}")]
+ if env["SWIFTEN_DLL"] :
+ env.AddMethod(lambda e,s : e.SharedObject(s), "SwiftenObject")
+ else :
+ env.AddMethod(lambda e,s : e.StaticObject(s), "SwiftenObject")
+
swiften_env = env.Clone()
swiften_env["LIBPATH"] = [Dir(".")]
swiften_env["LIBRUNPATH"] = [Dir(".")]
@@ -86,11 +91,9 @@ if env["SCONS_STAGE"] == "build" :
swiften_env.UseFlags(swiften_env["PLATFORM_FLAGS"])
if swiften_env["SWIFTEN_DLL"] :
- swiften_env.AddMethod(lambda e,s : e.SharedObject(s), "SwiftenObject")
swiften_env.AddMethod(lambda e,l,o : e.SharedLibrary(l,o), "SwiftenLibrary")
else :
swiften_env.Append(CPPDEFINES = ["SWIFTEN_STATIC"])
- swiften_env.AddMethod(lambda e,s : e.StaticObject(s), "SwiftenObject")
swiften_env.AddMethod(lambda e,l,o : e.StaticLibrary(l,o), "SwiftenLibrary")
Export("swiften_env")