summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/SConscript74
-rw-r--r--Swift/SConscript15
2 files changed, 50 insertions, 39 deletions
diff --git a/Swift/Controllers/SConscript b/Swift/Controllers/SConscript
index bd2c16e..8c12c50 100644
--- a/Swift/Controllers/SConscript
+++ b/Swift/Controllers/SConscript
@@ -1,36 +1,46 @@
Import("env")
-env["SWIFT_CONTROLLERS_FLAGS"] = {
- "LIBPATH": [Dir(".")],
- "LIBS": ["SwiftControllers"]
- }
+################################################################################
+# Flags
+################################################################################
-myenv = env.Clone()
-myenv.MergeFlags(env["BOOST_FLAGS"])
-myenv.StaticLibrary("SwiftControllers", [
- "Chat/ChatController.cpp",
- "Chat/ChatControllerBase.cpp",
- "Chat/ChatsManager.cpp",
- "MainController.cpp",
- "NickResolver.cpp",
- "RosterController.cpp",
- "XMPPRosterController.cpp",
- "Chat/MUCController.cpp",
- "EventController.cpp",
- "EventWindowController.cpp",
- "SoundEventController.cpp",
- "SystemTrayController.cpp",
- "XMLConsoleController.cpp",
- "UIEvents/UIEvent.cpp",
- "UIInterfaces/XMLConsoleWidget.cpp",
- "PreviousStatusStore.cpp",
- ])
+if env["SCONS_STAGE"] == "flags" :
+ env["SWIFT_CONTROLLERS_FLAGS"] = {
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["SwiftControllers"]
+ }
-env.Append(UNITTEST_SOURCES = [
- File("UnitTest/NickResolverTest.cpp"),
- File("UnitTest/RosterControllerTest.cpp"),
- File("UnitTest/XMPPRosterControllerTest.cpp"),
- File("UnitTest/PreviousStatusStoreTest.cpp"),
- File("Chat/UnitTest/ChatsManagerTest.cpp"),
- File("UnitTest/MockChatWindow.cpp"),
- ])
+################################################################################
+# Build
+################################################################################
+
+if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.MergeFlags(env["BOOST_FLAGS"])
+ myenv.StaticLibrary("SwiftControllers", [
+ "Chat/ChatController.cpp",
+ "Chat/ChatControllerBase.cpp",
+ "Chat/ChatsManager.cpp",
+ "MainController.cpp",
+ "NickResolver.cpp",
+ "RosterController.cpp",
+ "XMPPRosterController.cpp",
+ "Chat/MUCController.cpp",
+ "EventController.cpp",
+ "EventWindowController.cpp",
+ "SoundEventController.cpp",
+ "SystemTrayController.cpp",
+ "XMLConsoleController.cpp",
+ "UIEvents/UIEvent.cpp",
+ "UIInterfaces/XMLConsoleWidget.cpp",
+ "PreviousStatusStore.cpp",
+ ])
+
+ env.Append(UNITTEST_SOURCES = [
+ File("UnitTest/NickResolverTest.cpp"),
+ File("UnitTest/RosterControllerTest.cpp"),
+ File("UnitTest/XMPPRosterControllerTest.cpp"),
+ File("UnitTest/PreviousStatusStoreTest.cpp"),
+ File("Chat/UnitTest/ChatsManagerTest.cpp"),
+ File("UnitTest/MockChatWindow.cpp"),
+ ])
diff --git a/Swift/SConscript b/Swift/SConscript
index 1460091..8f1fa26 100644
--- a/Swift/SConscript
+++ b/Swift/SConscript
@@ -2,14 +2,15 @@ import datetime
Import("env")
-if not GetOption("help") and not env.get("HAVE_OPENSSL", 0) :
- print "Error: Swift requires OpenSSL support, and OpenSSL was not found."
- Exit(1)
+SConscript("Controllers/SConscript")
+if env["SCONS_STAGE"] == "build" :
+ if not GetOption("help") and not env.get("HAVE_OPENSSL", 0) :
+ print "Error: Swift requires OpenSSL support, and OpenSSL was not found."
+ Exit(1)
-env["SWIFT_VERSION"] = "0.9.9." + datetime.date.today().strftime("%Y%m%d")
-SConscript("Controllers/SConscript")
+ env["SWIFT_VERSION"] = "0.9.9." + datetime.date.today().strftime("%Y%m%d")
-if env["target"] == "native":
- SConscript("QtUI/SConscript")
+ if env["target"] == "native":
+ SConscript("QtUI/SConscript")