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
parentb9e7c0033eb36ab1d24183be95d898f94cc487af (diff)
downloadswift-2b65c91bcd2367f816658c82fc230e881bcb1084.zip
swift-2b65c91bcd2367f816658c82fc230e881bcb1084.tar.bz2
Build 3rdParty libraries with SwiftenObject.
This ensures that they can be linked when building Swiften in DLL mode. Change-Id: I8a4ff9dab6003e60fab21aba2bbb4beccb26bef6
-rw-r--r--3rdParty/Expat/SConscript2
-rw-r--r--3rdParty/LibIDN/SConscript2
-rw-r--r--3rdParty/LibMiniUPnPc/SConscript2
-rw-r--r--3rdParty/LibNATPMP/SConscript2
-rw-r--r--3rdParty/SQLite/SConscript3
-rw-r--r--3rdParty/SQLiteAsync/SConscript2
-rw-r--r--3rdParty/ZLib/SConscript2
-rw-r--r--Swiften/SConscript7
8 files changed, 13 insertions, 9 deletions
diff --git a/3rdParty/Expat/SConscript b/3rdParty/Expat/SConscript
index 2a77d39..d5724b4 100644
--- a/3rdParty/Expat/SConscript
+++ b/3rdParty/Expat/SConscript
@@ -18,7 +18,7 @@ if env.get("EXPAT_BUNDLED", False) :
myenv.Append(CPPDEFINES = ["HAVE_MEMMOVE"])
conf.Finish()
- env["EXPAT_OBJECTS"] = myenv.StaticObject([
+ env["EXPAT_OBJECTS"] = myenv.SwiftenObject([
"src/xmltok.c",
"src/xmlparse.c",
"src/xmlrole.c"
diff --git a/3rdParty/LibIDN/SConscript b/3rdParty/LibIDN/SConscript
index 9d4822d..92d6836 100644
--- a/3rdParty/LibIDN/SConscript
+++ b/3rdParty/LibIDN/SConscript
@@ -49,7 +49,7 @@ if env.get("LIBIDN_BUNDLED", False) :
if myenv["MSVC_VERSION"][:3] == "9.0" :
myenv.Append(CPPPATH = "stubs/win32/VC2008")
- env["LIBIDN_OBJECTS"] = myenv.StaticObject([
+ env["LIBIDN_OBJECTS"] = myenv.SwiftenObject([
"src/stringprep.c",
"src/profiles.c",
"src/rfc3454.c",
diff --git a/3rdParty/LibMiniUPnPc/SConscript b/3rdParty/LibMiniUPnPc/SConscript
index 4fe761a..0cf0be7 100644
--- a/3rdParty/LibMiniUPnPc/SConscript
+++ b/3rdParty/LibMiniUPnPc/SConscript
@@ -49,7 +49,7 @@ if env.get("LIBMINIUPNPC_BUNDLED", False) :
#endif
""".replace("$OS_STRING", myenv["PLATFORM"])))
- env["LIBMINIUPNPC_OBJECTS"] = myenv.StaticObject([
+ env["LIBMINIUPNPC_OBJECTS"] = myenv.SwiftenObject([
"src/miniupnpc/igd_desc_parse.c",
"src/miniupnpc/miniupnpc.c",
"src/miniupnpc/minixml.c",
diff --git a/3rdParty/LibNATPMP/SConscript b/3rdParty/LibNATPMP/SConscript
index 98767fb..7adaa51 100644
--- a/3rdParty/LibNATPMP/SConscript
+++ b/3rdParty/LibNATPMP/SConscript
@@ -47,4 +47,4 @@ if env.get("LIBNATPMP_BUNDLED", False) :
if myenv["PLATFORM"] == "win32":
src_files += ["src/libnatpmp/wingettimeofday.c"]
- env["LIBNATPMP_OBJECTS"] = myenv.StaticObject(src_files)
+ env["LIBNATPMP_OBJECTS"] = myenv.SwiftenObject(src_files)
diff --git a/3rdParty/SQLite/SConscript b/3rdParty/SQLite/SConscript
index e01bca2..ffa8946 100644
--- a/3rdParty/SQLite/SConscript
+++ b/3rdParty/SQLite/SConscript
@@ -15,4 +15,5 @@ if env.get("SQLITE_BUNDLED", False) :
if env["SCONS_STAGE"] == "build" :
myenv = env.Clone()
myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
- env["SQLITE_OBJECTS"] = myenv.StaticObject(["sqlite3.c"], CPPPATH = ["."])
+ myenv.Append(CPPPATH = ["."])
+ env["SQLITE_OBJECTS"] = myenv.SwiftenObject(["sqlite3.c"])
diff --git a/3rdParty/SQLiteAsync/SConscript b/3rdParty/SQLiteAsync/SConscript
index 3d6fa39..b515055 100644
--- a/3rdParty/SQLiteAsync/SConscript
+++ b/3rdParty/SQLiteAsync/SConscript
@@ -16,4 +16,4 @@ if env.get("SQLITE_ASYNC_BUNDLED", False) :
myenv = env.Clone()
myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
myenv.UseFlags(env.get("SQLITE_FLAGS", {}))
- env["SQLITE_ASYNC_OBJECTS"] = myenv.StaticObject(["sqlite3async.c"])
+ env["SQLITE_ASYNC_OBJECTS"] = myenv.SwiftenObject(["sqlite3async.c"])
diff --git a/3rdParty/ZLib/SConscript b/3rdParty/ZLib/SConscript
index 5540ae8..3625ee6 100644
--- a/3rdParty/ZLib/SConscript
+++ b/3rdParty/ZLib/SConscript
@@ -8,7 +8,7 @@ if env.get("ZLIB_BUNDLED", False) :
}
if env["SCONS_STAGE"] == "build" :
- env["ZLIB_OBJECTS"] = env.StaticObject([
+ env["ZLIB_OBJECTS"] = env.SwiftenObject([
"src/adler32.c",
"src/compress.c",
"src/crc32.c",
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")