summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/SConscript')
-rw-r--r--Swiften/SConscript86
1 files changed, 70 insertions, 16 deletions
diff --git a/Swiften/SConscript b/Swiften/SConscript
index 12c7456..6e129a3 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -1,4 +1,4 @@
-import os, re, Version
+import os, re, Version, os.path
Import("env")
@@ -6,7 +6,7 @@ Import("env")
# Flags
################################################################################
-swiften_dep_modules = ["BOOST", "LIBIDN", "ZLIB", "OPENSSL", "LIBXML", "EXPAT", "AVAHI"]
+swiften_dep_modules = ["BOOST", "GCONF", "LIBIDN", "ZLIB", "OPENSSL", "LIBXML", "EXPAT", "AVAHI", "LIBMINIUPNPC", "LIBNATPMP"]
if env["SCONS_STAGE"] == "flags" :
env["SWIFTEN_VERSION"] = Version.getBuildVersion(env.Dir("#").abspath, "swift")
@@ -21,6 +21,7 @@ if env["SCONS_STAGE"] == "flags" :
env["SWIFTEN_LIBRARY"] = "Swiften"
env["SWIFTEN_LIBRARY_FILE"] = "Swiften"
env["SWIFTEN_LIBRARY_ALIASES"] = []
+
if ARGUMENTS.get("swiften_dll", False) :
if env["PLATFORM"] == "win32" :
pass
@@ -49,6 +50,7 @@ if env["SCONS_STAGE"] == "flags" :
"CPPFLAGS": e.get("CPPFLAGS", []),
"LIBPATH": e.get("LIBPATH", []),
"LIBS": e.get("LIBS", []),
+ "FRAMEWORKS": e.get("FRAMEWORKS", []),
}
################################################################################
@@ -76,25 +78,38 @@ if env["SCONS_STAGE"] == "build" :
"Client/ClientSessionStanzaChannel.cpp",
"Client/CoreClient.cpp",
"Client/Client.cpp",
+ "Client/ClientXMLTracer.cpp",
"Client/ClientSession.cpp",
+ "Client/BlockList.cpp",
+ "Client/BlockListImpl.cpp",
+ "Client/ClientBlockListManager.cpp",
"Client/MemoryStorages.cpp",
- "Client/FileStorages.cpp",
"Client/NickResolver.cpp",
"Client/NickManager.cpp",
"Client/NickManagerImpl.cpp",
+ "Client/Storages.cpp",
+ "Client/XMLBeautifier.cpp",
"Compress/ZLibCodecompressor.cpp",
"Compress/ZLibDecompressor.cpp",
"Compress/ZLibCompressor.cpp",
"Elements/DiscoInfo.cpp",
+ "Elements/Presence.cpp",
"Elements/Form.cpp",
+ "Elements/StreamFeatures.cpp",
"Elements/Element.cpp",
"Elements/IQ.cpp",
"Elements/Payload.cpp",
+ "Elements/RosterItemExchangePayload.cpp",
"Elements/RosterPayload.cpp",
"Elements/Stanza.cpp",
+ "Elements/StatusShow.cpp",
+ "Elements/StreamManagementEnabled.cpp",
+ "Elements/StreamResume.cpp",
+ "Elements/StreamResumed.cpp",
"Elements/VCard.cpp",
"Elements/MUCOccupant.cpp",
"Entity/Entity.cpp",
+ "Entity/PayloadPersister.cpp",
"MUC/MUC.cpp",
"MUC/MUCManager.cpp",
"MUC/MUCRegistry.cpp",
@@ -106,6 +121,8 @@ if env["SCONS_STAGE"] == "build" :
"Queries/Requests/GetInBandRegistrationFormRequest.cpp",
"Queries/Requests/SubmitInBandRegistrationFormRequest.cpp",
"Queries/Responders/SoftwareVersionResponder.cpp",
+ "Roster/RosterStorage.cpp",
+ "Roster/RosterMemoryStorage.cpp",
"Roster/XMPPRoster.cpp",
"Roster/XMPPRosterImpl.cpp",
"Roster/XMPPRosterController.cpp",
@@ -116,6 +133,9 @@ if env["SCONS_STAGE"] == "build" :
"Serializer/CompressRequestSerializer.cpp",
"Serializer/ElementSerializer.cpp",
"Serializer/MessageSerializer.cpp",
+ "Serializer/StreamManagementEnabledSerializer.cpp",
+ "Serializer/StreamResumeSerializer.cpp",
+ "Serializer/StreamResumedSerializer.cpp",
"Serializer/ComponentHandshakeSerializer.cpp",
"Serializer/PayloadSerializer.cpp",
"Serializer/PayloadSerializerCollection.cpp",
@@ -128,8 +148,11 @@ if env["SCONS_STAGE"] == "build" :
"Serializer/PayloadSerializers/FullPayloadSerializerCollection.cpp",
"Serializer/PayloadSerializers/MUCPayloadSerializer.cpp",
"Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp",
+ "Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp",
"Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.cpp",
+ "Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.cpp",
"Serializer/PayloadSerializers/ResourceBindSerializer.cpp",
+ "Serializer/PayloadSerializers/RosterItemExchangeSerializer.cpp",
"Serializer/PayloadSerializers/RosterSerializer.cpp",
"Serializer/PayloadSerializers/SecurityLabelSerializer.cpp",
"Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.cpp",
@@ -146,6 +169,14 @@ if env["SCONS_STAGE"] == "build" :
"Serializer/PayloadSerializers/SearchPayloadSerializer.cpp",
"Serializer/PayloadSerializers/FormSerializer.cpp",
"Serializer/PayloadSerializers/NicknameSerializer.cpp",
+ "Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.cpp",
+ "Serializer/PayloadSerializers/JinglePayloadSerializer.cpp",
+ "Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp",
+ "Serializer/PayloadSerializers/JingleFileTransferHashSerializer.cpp",
+ "Serializer/PayloadSerializers/JingleFileTransferReceivedSerializer.cpp",
+ "Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.cpp",
+ "Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.cpp",
+ "Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.cpp",
"Serializer/PresenceSerializer.cpp",
"Serializer/StanzaSerializer.cpp",
"Serializer/StreamErrorSerializer.cpp",
@@ -154,13 +185,13 @@ if env["SCONS_STAGE"] == "build" :
"Serializer/XML/XMLNode.cpp",
"Serializer/XMPPSerializer.cpp",
"Session/Session.cpp",
+ "Session/SessionTracer.cpp",
"Session/SessionStream.cpp",
"Session/BasicSessionStream.cpp",
"StringCodecs/Base64.cpp",
"StringCodecs/SHA1.cpp",
- "StringCodecs/HMACSHA1.cpp",
+ "StringCodecs/SHA256.cpp",
"StringCodecs/MD5.cpp",
- "StringCodecs/PBKDF2.cpp",
"StringCodecs/Hexify.cpp",
]
@@ -184,16 +215,20 @@ if env["SCONS_STAGE"] == "build" :
"LinkLocal",
"StreamManagement",
"Component",
- "Config",
+ "AdHoc"
])
- SConscript(test_only = True, dirs = [
+ if env["build_examples"] :
+ SConscript(dirs = [
+ "Config",
+ "Examples"
+ ])
+ env.SConscript(test_only = True, dirs = [
"QA",
])
- SConscript(dirs = [
- "Examples"
- ])
myenv = swiften_env.Clone()
+ if myenv["PLATFORM"] != "darwin" and myenv["PLATFORM"] != "win32" and myenv.get("HAVE_GCONF", 0) :
+ env.MergeFlags(env["GCONF_FLAGS"])
if ARGUMENTS.get("swiften_dll", False) :
if myenv["PLATFORM"] == "posix" :
myenv.Append(LINKFLAGS = ["-Wl,-soname,libSwiften.so.$SWIFTEN_VERSION_MAJOR"])
@@ -214,6 +249,7 @@ if env["SCONS_STAGE"] == "build" :
File("Avatars/UnitTest/CombinedAvatarProviderTest.cpp"),
File("Base/UnitTest/IDGeneratorTest.cpp"),
File("Base/UnitTest/StringTest.cpp"),
+ File("Base/UnitTest/DateTimeTest.cpp"),
File("Base/UnitTest/ByteArrayTest.cpp"),
File("Chat/UnitTest/ChatStateNotifierTest.cpp"),
# File("Chat/UnitTest/ChatStateTrackerTest.cpp"),
@@ -234,8 +270,6 @@ if env["SCONS_STAGE"] == "build" :
File("Elements/UnitTest/FormTest.cpp"),
File("EventLoop/UnitTest/EventLoopTest.cpp"),
File("EventLoop/UnitTest/SimpleEventLoopTest.cpp"),
- File("FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp"),
- File("FileTransfer/UnitTest/IBBSendSessionTest.cpp"),
# File("History/UnitTest/SQLiteHistoryManagerTest.cpp"),
File("JID/UnitTest/JIDTest.cpp"),
File("LinkLocal/UnitTest/LinkLocalConnectorTest.cpp"),
@@ -245,6 +279,8 @@ if env["SCONS_STAGE"] == "build" :
File("MUC/UnitTest/MUCTest.cpp"),
File("Network/UnitTest/HostAddressTest.cpp"),
File("Network/UnitTest/ConnectorTest.cpp"),
+ File("Network/UnitTest/ChainedConnectorTest.cpp"),
+ File("Network/UnitTest/HTTPConnectProxiedConnectionTest.cpp"),
File("Parser/PayloadParsers/UnitTest/BodyParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/DiscoInfoParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/ErrorParserTest.cpp"),
@@ -253,8 +289,10 @@ if env["SCONS_STAGE"] == "build" :
File("Parser/PayloadParsers/UnitTest/PriorityParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/RawXMLPayloadParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/ResourceBindParserTest.cpp"),
+ File("Parser/PayloadParsers/UnitTest/RosterItemExchangeParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/RosterParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/IBBParserTest.cpp"),
+ File("Parser/PayloadParsers/UnitTest/JingleParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/SearchPayloadParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp"),
@@ -266,8 +304,12 @@ if env["SCONS_STAGE"] == "build" :
File("Parser/PayloadParsers/UnitTest/StorageParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp"),
File("Parser/PayloadParsers/UnitTest/VCardUpdateParserTest.cpp"),
+ File("Parser/PayloadParsers/UnitTest/ReplaceTest.cpp"),
+ File("Parser/PayloadParsers/UnitTest/MUCAdminPayloadParserTest.cpp"),
+ File("Parser/PayloadParsers/UnitTest/MUCUserPayloadParserTest.cpp"),
File("Parser/UnitTest/AttributeMapTest.cpp"),
File("Parser/UnitTest/IQParserTest.cpp"),
+ File("Parser/UnitTest/GenericPayloadTreeParserTest.cpp"),
File("Parser/UnitTest/MessageParserTest.cpp"),
File("Parser/UnitTest/PayloadParserFactoryCollectionTest.cpp"),
File("Parser/UnitTest/PresenceParserTest.cpp"),
@@ -275,6 +317,7 @@ if env["SCONS_STAGE"] == "build" :
File("Parser/UnitTest/SerializingParserTest.cpp"),
File("Parser/UnitTest/StanzaParserTest.cpp"),
File("Parser/UnitTest/StreamFeaturesParserTest.cpp"),
+ File("Parser/UnitTest/StreamManagementEnabledParserTest.cpp"),
File("Parser/UnitTest/XMLParserTest.cpp"),
File("Parser/UnitTest/XMPPParserTest.cpp"),
File("Presence/UnitTest/PresenceOracleTest.cpp"),
@@ -286,6 +329,7 @@ if env["SCONS_STAGE"] == "build" :
File("Queries/UnitTest/ResponderTest.cpp"),
File("Roster/UnitTest/XMPPRosterImplTest.cpp"),
File("Roster/UnitTest/XMPPRosterControllerTest.cpp"),
+ File("Roster/UnitTest/XMPPRosterSignalHandler.cpp"),
File("Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.cpp"),
File("Serializer/PayloadSerializers/UnitTest/CapsInfoSerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp"),
@@ -293,6 +337,7 @@ if env["SCONS_STAGE"] == "build" :
File("Serializer/PayloadSerializers/UnitTest/ErrorSerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/PrioritySerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp"),
+ File("Serializer/PayloadSerializers/UnitTest/RosterItemExchangeSerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/RosterSerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/SearchPayloadSerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/SecurityLabelSerializerTest.cpp"),
@@ -306,6 +351,9 @@ if env["SCONS_STAGE"] == "build" :
File("Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp"),
File("Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp"),
+ File("Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp"),
+ File("Serializer/PayloadSerializers/UnitTest/MUCAdminPayloadSerializerTest.cpp"),
+ File("Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp"),
File("Serializer/UnitTest/StreamFeaturesSerializerTest.cpp"),
File("Serializer/UnitTest/AuthSuccessSerializerTest.cpp"),
File("Serializer/UnitTest/AuthChallengeSerializerTest.cpp"),
@@ -319,9 +367,10 @@ if env["SCONS_STAGE"] == "build" :
File("StreamStack/UnitTest/XMPPLayerTest.cpp"),
File("StringCodecs/UnitTest/Base64Test.cpp"),
File("StringCodecs/UnitTest/SHA1Test.cpp"),
+ File("StringCodecs/UnitTest/SHA256Test.cpp"),
File("StringCodecs/UnitTest/MD5Test.cpp"),
File("StringCodecs/UnitTest/HexifyTest.cpp"),
- File("StringCodecs/UnitTest/HMACSHA1Test.cpp"),
+ File("StringCodecs/UnitTest/HMACTest.cpp"),
File("StringCodecs/UnitTest/PBKDF2Test.cpp"),
File("TLS/UnitTest/ServerIdentityVerifierTest.cpp"),
File("TLS/UnitTest/CertificateTest.cpp"),
@@ -329,6 +378,9 @@ if env["SCONS_STAGE"] == "build" :
])
# 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
@@ -338,7 +390,9 @@ if env["SCONS_STAGE"] == "build" :
for file in files :
if not file.endswith(".h") :
continue
- include = os.path.relpath(os.path.join(root, file), top_path)
+ 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") :
@@ -349,11 +403,11 @@ if env["SCONS_STAGE"] == "build" :
continue
# Library-specific files
- if file.startswith("CAres") or file.startswith("LibXML") or file.startswith("Expat") or file.startswith("SQLite") :
+ if 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") :
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" :
+ 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)