From 2c7fb800745172e2d190d15e556fb59f3a930fa1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sun, 16 Sep 2012 10:18:53 +0200
Subject: Start including some bundled libraries in Swiften library.


diff --git a/3rdParty/Expat/SConscript b/3rdParty/Expat/SConscript
index 2898be4..9e329f4 100644
--- a/3rdParty/Expat/SConscript
+++ b/3rdParty/Expat/SConscript
@@ -19,7 +19,7 @@ if env.get("EXPAT_BUNDLED", False) :
 			myenv.Append(CPPDEFINES = ["HAVE_MEMMOVE"])
 		conf.Finish()
 
-		myenv.StaticLibrary("Swiften_Expat", [
+		env["EXPAT_OBJECTS"] = myenv.StaticObject([
 				"src/xmltok.c",
 				"src/xmlparse.c",
 				"src/xmlrole.c"
diff --git a/3rdParty/LibIDN/SConscript b/3rdParty/LibIDN/SConscript
index 3f88bfc..9d4822d 100644
--- a/3rdParty/LibIDN/SConscript
+++ b/3rdParty/LibIDN/SConscript
@@ -10,8 +10,6 @@ if env.get("LIBIDN_BUNDLED", False) :
 		env["LIBIDN_FLAGS"] = {
 				"CPPDEFINES": ["IDNA_STATIC"],
 				"CPPPATH": [Dir("src")],
-				"LIBPATH": [Dir(".")],
-				"LIBS": ["Swiften_IDN"],
 			}
 		if env["PLATFORM"] == "win32" :
 			env["LIBIDN_FLAGS"]["CPPPATH"] += [Dir("stubs/win32")]
@@ -51,7 +49,7 @@ if env.get("LIBIDN_BUNDLED", False) :
 			if myenv["MSVC_VERSION"][:3] == "9.0" :
 				myenv.Append(CPPPATH = "stubs/win32/VC2008")
 
-		myenv.StaticLibrary("Swiften_IDN", [
+		env["LIBIDN_OBJECTS"] = myenv.StaticObject([
 				"src/stringprep.c",
 				"src/profiles.c",
 				"src/rfc3454.c",
diff --git a/Swiften/SConscript b/Swiften/SConscript
index 7ad2a38..5546975 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -69,6 +69,8 @@ if env["SCONS_STAGE"] == "build" :
 	swiften_env.Append(CPPDEFINES = ["SWIFTEN_BUILDING"])
 	for module in swiften_dep_modules :
 		swiften_env.UseFlags(swiften_env.get(module + "_FLAGS", {}))
+		if env.get(module + "_BUNDLED", False) :
+			swiften_env.Append(SWIFTEN_OBJECTS = env.get(module + "_OBJECTS", []))
 	swiften_env.UseFlags(swiften_env["PLATFORM_FLAGS"])
 	
 	if swiften_env["SWIFTEN_DLL"] :
-- 
cgit v0.10.2-6-g49f6