diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-08-29 18:06:03 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-08-29 18:08:06 (GMT) |
commit | bf9cfb6aa5bda0a33da6dfc12ef49321500256ed (patch) | |
tree | f65132bd5b1a27d54bd78858908ed6ae38b8fbc4 | |
parent | 46b13c4d25270c6933d20c6aa790619e30e4cfe8 (diff) | |
download | swift-bf9cfb6aa5bda0a33da6dfc12ef49321500256ed.zip swift-bf9cfb6aa5bda0a33da6dfc12ef49321500256ed.tar.bz2 |
Put platform flags in PLATFORM_FLAGS variable.
This should avoid problems with --as-needed.
Resolves: #547
-rw-r--r-- | BuildTools/SCons/SConstruct | 14 | ||||
-rw-r--r-- | QA/UnitTest/SConscript | 1 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 1 | ||||
-rw-r--r-- | Swiften/Examples/ConnectivityTest/SConscript | 1 | ||||
-rw-r--r-- | Swiften/Examples/SendMessage/SConscript | 1 |
5 files changed, 12 insertions, 6 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 98feccd..5a64f2d 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -47,6 +47,9 @@ env = Environment(CPPPATH = "#", ENV = { Help(vars.GenerateHelpText(env)) +# Default environment variables +env["PLATFORM_FLAGS"] = {} + # Default custom tools env.Tool("Test", toolpath = ["#/BuildTools/SCons/Tools"]) env.Tool("WriteVal", toolpath = ["#/BuildTools/SCons/Tools"]) @@ -275,16 +278,15 @@ if not conf.CheckCXX() or not conf.CheckCC() : env["HAVE_ZLIB"] = True if conf.CheckLib("z") : - env.Append(LIBS = "z") - env["ZLIB_FLAGS"] = "" + env["ZLIB_FLAGS"] = {"LIBS": ["z"]} else : env["ZLIB_BUNDLED"] = True -if conf.CheckLib("c") : - env.Append(LIBS = ["c"]) - if conf.CheckLib("resolv") : - env.Append(LIBS = ["resolv"]) + env["PLATFORM_FLAGS"]["LIBS"] = env["PLATFORM_FLAGS"].get("LIBS", []) + ["resolv"] + +if conf.CheckLib("c") : + env["PLATFORM_FLAGS"]["LIBS"] = env["PLATFORM_FLAGS"].get("LIBS", []) + ["c"] # LibIDN if conf.CheckCHeader("idna.h") and conf.CheckLib("idn") : diff --git a/QA/UnitTest/SConscript b/QA/UnitTest/SConscript index d47474d..b5f382c 100644 --- a/QA/UnitTest/SConscript +++ b/QA/UnitTest/SConscript @@ -20,6 +20,7 @@ if env["TEST"] : myenv.MergeFlags(env.get("LIBXML_FLAGS", "")) myenv.MergeFlags(env.get("EXPAT_FLAGS", "")) myenv.MergeFlags(env.get("ZLIB_FLAGS", "")) + myenv.MergeFlags(env["PLATFORM_FLAGS"]) if env.get("HAVE_LIBXML") : myenv.Append(CPPDEFINES = ["HAVE_LIBXML"]) if env.get("HAVE_EXPAT") : diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 0d043fb..f119397 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -35,6 +35,7 @@ myenv.MergeFlags(env["ZLIB_FLAGS"]) myenv.MergeFlags(env["OPENSSL_FLAGS"]) myenv.MergeFlags(env.get("LIBXML_FLAGS", "")) myenv.MergeFlags(env.get("EXPAT_FLAGS", "")) +myenv.MergeFlags(myenv["PLATFORM_FLAGS"]) myenv.Tool("qt4", toolpath = ["#/BuildTools/SCons/Tools"]) myenv.Tool("nsis", toolpath = ["#/BuildTools/SCons/Tools"]) diff --git a/Swiften/Examples/ConnectivityTest/SConscript b/Swiften/Examples/ConnectivityTest/SConscript index 6563ded..f66c57f 100644 --- a/Swiften/Examples/ConnectivityTest/SConscript +++ b/Swiften/Examples/ConnectivityTest/SConscript @@ -9,4 +9,5 @@ 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"]) tester = myenv.Program("ConnectivityTest", ["ConnectivityTest.cpp"]) diff --git a/Swiften/Examples/SendMessage/SConscript b/Swiften/Examples/SendMessage/SConscript index bc9bde2..05ab4c3 100644 --- a/Swiften/Examples/SendMessage/SConscript +++ b/Swiften/Examples/SendMessage/SConscript @@ -9,4 +9,5 @@ myenv.MergeFlags(myenv["OPENSSL_FLAGS"]) myenv.MergeFlags(myenv.get("SQLITE_FLAGS", {})) myenv.MergeFlags(myenv.get("LIBXML_FLAGS", "")) myenv.MergeFlags(myenv.get("EXPAT_FLAGS", "")) +myenv.MergeFlags(myenv["PLATFORM_FLAGS"]) tester = myenv.Program("SendMessage", ["SendMessage.cpp"]) |