summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BuildTools/SCons/SConstruct12
-rw-r--r--Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript9
-rw-r--r--Swiften/QA/ClientTest/SConscript10
-rw-r--r--Swiften/SConscript23
4 files changed, 27 insertions, 27 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index fc9ca3b..31d74fa 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -553,20 +553,20 @@ if env.Dir("#/.git").exists() :
# Modules
modules = []
-for dir in os.listdir(Dir("#").abspath) :
- full_dir = os.path.join(Dir("#").abspath, dir)
+for dir in os.listdir(Dir("#/3rdParty").abspath) :
+ full_dir = os.path.join(Dir("#/3rdParty").abspath, dir)
if not os.path.isdir(full_dir) :
continue
sconscript = os.path.join(full_dir, "SConscript")
if os.path.isfile(sconscript) :
- modules.append(dir)
-for dir in os.listdir(Dir("#/3rdParty").abspath) :
- full_dir = os.path.join(Dir("#/3rdParty").abspath, dir)
+ modules.append("3rdParty/" + dir)
+for dir in os.listdir(Dir("#").abspath) :
+ full_dir = os.path.join(Dir("#").abspath, dir)
if not os.path.isdir(full_dir) :
continue
sconscript = os.path.join(full_dir, "SConscript")
if os.path.isfile(sconscript) :
- modules.append("3rdParty/" + dir)
+ modules.append(dir)
# Flags
env["PROJECTS"] = [m for m in modules if m not in ["Documentation", "QA", "SwifTools"] and not m.startswith("3rdParty")]
diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript
index 6a3bcb4..2ccfb7e 100644
--- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript
+++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript
@@ -2,14 +2,7 @@ Import("env")
example_env = env.Clone()
example_env.MergeFlags(example_env["SWIFTEN_FLAGS"])
-example_env.MergeFlags(example_env["LIBIDN_FLAGS"])
-example_env.MergeFlags(example_env["BOOST_FLAGS"])
-example_env.MergeFlags(example_env.get("SQLITE_FLAGS", {}))
-example_env.MergeFlags(example_env["ZLIB_FLAGS"])
-example_env.MergeFlags(example_env["OPENSSL_FLAGS"])
-example_env.MergeFlags(example_env.get("LIBXML_FLAGS", ""))
-example_env.MergeFlags(example_env.get("EXPAT_FLAGS", ""))
-example_env.MergeFlags(example_env["PLATFORM_FLAGS"])
+example_env.MergeFlags(example_env["SWIFTEN_DEP_FLAGS"])
for i in range(1,6) :
example_env.Program("EchoBot" + str(i), ["EchoBot" + str(i) + ".cpp"])
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