summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-02-28 16:26:45 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-28 16:26:45 (GMT)
commit920fa6a454e921dd0480ae2675f195382fccf32a (patch)
tree1564f7c06e12e04f25279ca8cab36cfca19f3251
parent0e4f068273ecaa2be24a046812893698a06481bc (diff)
downloadswift-contrib-920fa6a454e921dd0480ae2675f195382fccf32a.zip
swift-contrib-920fa6a454e921dd0480ae2675f195382fccf32a.tar.bz2
Also compile on non-Windows
-rw-r--r--Swiften/SConscript2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/SConscript b/Swiften/SConscript
index ecf32ef..c12d3b2 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -386,59 +386,59 @@ if env["SCONS_STAGE"] == "build" :
File("StringCodecs/UnitTest/MD5Test.cpp"),
File("StringCodecs/UnitTest/HexifyTest.cpp"),
File("StringCodecs/UnitTest/HMACTest.cpp"),
File("StringCodecs/UnitTest/PBKDF2Test.cpp"),
File("TLS/UnitTest/ServerIdentityVerifierTest.cpp"),
File("TLS/UnitTest/CertificateTest.cpp"),
File("VCards/UnitTest/VCardManagerTest.cpp"),
])
# Generate the Swiften header
def relpath(path, start) :
i = len(os.path.commonprefix([path, start]))
return path[i+1:]
swiften_header = "#pragma once\n"
swiften_includes = []
top_path = env.Dir("..").abspath
for root, dirs, files in os.walk(env.Dir(".").abspath) :
if root.endswith("UnitTest") :
continue
for file in files :
if not file.endswith(".h") :
continue
include = relpath(os.path.join(root, file), top_path)
if swiften_env["PLATFORM"] == "win32" :
include = include.replace("\\", "/")
swiften_includes.append(include)
# Private modules
if root.endswith("Config") or root.endswith("Compress") :
continue
# Library-specfifc private modules
if root.endswith("OpenSSL") or root.endswith("Cocoa") or root.endswith("Qt") or root.endswith("IDN") or root.endswith("Avahi") or root.endswith("Bonjour") :
continue
# Library-specific files
- if file.startswith("Schannel") or file.startswith("CAPI") or file.startswith("CAres") or file.startswith("LibXML") or file.startswith("Expat") or file.startswith("GConf") or file.startswith("MacOSX") or file.startswith("Windows") or file.startswith("SQLite") or file.startswith("NATPMP") or file.startswith("MiniUPnP") :
+ if file.startswith("Schannel") or file.startswith("CAPI") or file.startswith("CAres") or file.startswith("LibXML") or file.startswith("Expat") or file.startswith("GConf") or file.startswith("MacOSX") or file.startswith("Windows") or file.endswith("_Windows.h") or file.startswith("SQLite") or file.startswith("NATPMP") or file.startswith("MiniUPnP") :
continue
# Specific headers we don't want to globally include
if file == "Swiften.h" or file == "foreach.h" or file == "Log.h" or file == "format.h" or file == "CompressionLayer.h":
continue
swiften_header += "#include <" + include + ">\n"
swiften_includes.append(include)
swiften_env.WriteVal("Swiften.h", swiften_env.Value(swiften_header))
swiften_includes.append("Swiften/Swiften.h")
version_header = "#pragma once\n\n"
version_header += "#define SWIFTEN_VERSION 0x%02X%02X%02X\n" % (swiften_env["SWIFTEN_VERSION_MAJOR"], swiften_env["SWIFTEN_VERSION_MINOR"], swiften_env["SWIFTEN_VERSION_PATCH"])
version_header += "#define SWIFTEN_VERSION_STRING \"%s\"\n" % swiften_env["SWIFTEN_VERSION"]
swiften_env.WriteVal("Version.h", swiften_env.Value(version_header))
swiften_includes.append("Swiften/Version.h")
# Install swiften
if swiften_env.get("SWIFTEN_INSTALLDIR", "") :
swiften_env.Install(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "lib"), swiften_lib)
for alias in myenv["SWIFTEN_LIBRARY_ALIASES"] :
myenv.Command(myenv.File(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "lib", alias)), [env.Value(swiften_lib[0].name), swiften_lib[0]], symlink)
for include in swiften_includes :
swiften_env.Install(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "include", os.path.dirname(include)), "#/" + include)