summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-27 21:26:10 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-27 21:26:10 (GMT)
commit48ffe88bf768fd762a3bcb52717a9079ec803de5 (patch)
tree57c49fe3ba8b95f193bf1431d8ba819a4981b0ad /Swiften
parent51517e2adaed04a10709f24c31138e7c2b60d4d8 (diff)
downloadswift-contrib-48ffe88bf768fd762a3bcb52717a9079ec803de5.zip
swift-contrib-48ffe88bf768fd762a3bcb52717a9079ec803de5.tar.bz2
Introduce SWIFTEN_DEP_FLAGS.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/QA/ClientTest/SConscript10
-rw-r--r--Swiften/SConscript23
2 files changed, 20 insertions, 13 deletions
diff --git a/Swiften/QA/ClientTest/SConscript b/Swiften/QA/ClientTest/SConscript
index e85d8c8..31c4011 100644
--- a/Swiften/QA/ClientTest/SConscript
+++ b/Swiften/QA/ClientTest/SConscript
@@ -5,15 +5,7 @@ Import("env")
if env["TEST"] :
myenv = env.Clone()
myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
- myenv.MergeFlags(myenv["CPPUNIT_FLAGS"])
- myenv.MergeFlags(myenv["LIBIDN_FLAGS"])
- myenv.MergeFlags(myenv["BOOST_FLAGS"])
- myenv.MergeFlags(myenv.get("SQLITE_FLAGS", ""))
- myenv.MergeFlags(myenv["ZLIB_FLAGS"])
- myenv.MergeFlags(myenv["OPENSSL_FLAGS"])
- myenv.MergeFlags(myenv.get("LIBXML_FLAGS", ""))
- myenv.MergeFlags(myenv.get("EXPAT_FLAGS", ""))
- myenv.MergeFlags(myenv["PLATFORM_FLAGS"])
+ myenv.MergeFlags(myenv["SWIFTEN_DEP_FLAGS"])
for i in ["SWIFT_CLIENTTEST_JID", "SWIFT_CLIENTTEST_PASS"]:
if ARGUMENTS.get(i.lower(), False) :
diff --git a/Swiften/SConscript b/Swiften/SConscript
index 335dfa5..e81309e 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -7,10 +7,25 @@ Import("env")
################################################################################
if env["SCONS_STAGE"] == "flags" :
- env["SWIFTEN_FLAGS"] = {
- "LIBPATH": [Dir(".")],
- "LIBS": ["Swiften"]
- }
+ swiften_env = env.Clone()
+ swiften_env["LIBPATH"] = [Dir(".")]
+ swiften_env["LIBS"] = ["Swiften"]
+ dep_env = env.Clone()
+ dep_env.MergeFlags(dep_env["PLATFORM_FLAGS"])
+ for module in ["BOOST", "LIBIDN", "ZLIB", "OPENSSL", "LIBXML", "EXPAT"] :
+ if env.get(module + "_BUNDLED", False) :
+ swiften_env.MergeFlags(env.get(module + "_FLAGS", {}))
+ else :
+ dep_env.MergeFlags(env.get(module + "_FLAGS", {}))
+
+ for var, e in [("SWIFTEN_FLAGS", swiften_env), ("SWIFTEN_DEP_FLAGS", dep_env)] :
+ env[var] = {
+ "CPPDEFINES": e.get("CPPDEFINES", []),
+ "CPPPATH": e.get("CPPPATH", []),
+ "CPPFLAGS": e.get("CPPFLAGS", []),
+ "LIBPATH": e.get("LIBPATH", []),
+ "LIBS": e.get("LIBS", []),
+ }
################################################################################
# Build