summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-22 20:31:22 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-22 20:31:22 (GMT)
commit65264ae8017d5a3cf1432078cd4eaa4257645662 (patch)
tree46836deb4c17a0ec756236d59699f921abd5b5bb /Slimber
parent618bfa7276fe46f308a7ab8f003c785bf863c7e8 (diff)
downloadswift-contrib-65264ae8017d5a3cf1432078cd4eaa4257645662.zip
swift-contrib-65264ae8017d5a3cf1432078cd4eaa4257645662.tar.bz2
Don't build Slimber if no zeroconf is available.
Diffstat (limited to 'Slimber')
-rw-r--r--Slimber/SConscript71
1 files changed, 42 insertions, 29 deletions
diff --git a/Slimber/SConscript b/Slimber/SConscript
index b3ceba6..2d1d33b 100644
--- a/Slimber/SConscript
+++ b/Slimber/SConscript
@@ -1,40 +1,53 @@
Import("env")
+env["BUILD_SLIMBER"] = True
+if env["PLATFORM"] == "win32" :
+ if not env.get("HAVE_BONJOUR") and "Slimber" in env["PROJECTS"] :
+ env["PROJECTS"].remove("Slimber")
+elif env["PLATFORM"] != "darwin" :
+ if not env.get("HAVE_AVAHI", False) and "Slimber" in env["PROJECTS"] :
+ env["PROJECTS"].remove("Slimber")
+
+if not "Slimber" in env["PROJECTS"] and env["SCONS_STAGE"] == "flags" :
+ print "Bonjour missing. Not building Slimber."
+
+if "Slimber" in env["PROJECTS"] :
+
################################################################################
# Flags
################################################################################
-if env["SCONS_STAGE"] == "flags" :
- env["SLIMBER_FLAGS"] = {
- "LIBPATH": [Dir(".")],
- "LIBS": ["Slimber"]
- }
+ if env["SCONS_STAGE"] == "flags" :
+ env["SLIMBER_FLAGS"] = {
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["Slimber"]
+ }
################################################################################
# Build
################################################################################
-if env["SCONS_STAGE"] == "build" :
- myenv = env.Clone()
- myenv.MergeFlags(env["BOOST_FLAGS"])
- myenv.MergeFlags(env["SWIFTEN_FLAGS"])
- myenv.StaticLibrary("Slimber", [
- "LinkLocalPresenceManager.cpp",
- "FileVCardCollection.cpp",
- "VCardCollection.cpp",
- "Server.cpp",
- "MainController.cpp",
- "MenuletController.cpp",
- "Menulet.cpp"
- ])
-
- env.Append(UNITTEST_SOURCES = [
- File("UnitTest/LinkLocalPresenceManagerTest.cpp"),
- File("UnitTest/MenuletControllerTest.cpp")
- ])
-
- SConscript("CLI/SConscript")
- if env["PLATFORM"] == "darwin" :
- SConscript("Cocoa/SConscript")
- else :
- SConscript("Qt/SConscript")
+ if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.MergeFlags(env["BOOST_FLAGS"])
+ myenv.MergeFlags(env["SWIFTEN_FLAGS"])
+ myenv.StaticLibrary("Slimber", [
+ "LinkLocalPresenceManager.cpp",
+ "FileVCardCollection.cpp",
+ "VCardCollection.cpp",
+ "Server.cpp",
+ "MainController.cpp",
+ "MenuletController.cpp",
+ "Menulet.cpp"
+ ])
+
+ env.Append(UNITTEST_SOURCES = [
+ File("UnitTest/LinkLocalPresenceManagerTest.cpp"),
+ File("UnitTest/MenuletControllerTest.cpp")
+ ])
+
+ SConscript("CLI/SConscript")
+ if env["PLATFORM"] == "darwin" :
+ SConscript("Cocoa/SConscript")
+ else :
+ SConscript("Qt/SConscript")