summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-27 21:50:54 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-27 21:50:54 (GMT)
commit05fa7a57b3c7df3a9cc717cba202c96be05fa21a (patch)
tree70ddc33247920490c946bd73421083851dcaef31 /SConstruct
parentaa09a889108c4d0e3c5888ad98958d8f3e12bd3b (diff)
downloadswift-05fa7a57b3c7df3a9cc717cba202c96be05fa21a.zip
swift-05fa7a57b3c7df3a9cc717cba202c96be05fa21a.tar.bz2
Added (Sparkle) AutoUpdater.
Not plugged into Swift yet.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct24
1 files changed, 24 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index e4ef041..98cd348 100644
--- a/SConstruct
+++ b/SConstruct
@@ -156,6 +156,12 @@ if int(ARGUMENTS.get("V", 0)) == 0:
env["TESTCOMSTR"] = colorize("TEST", "$SOURCE", "yellow")
#Progress(colorize("DEP", "$TARGET", "red")
+def checkObjCHeader(context, header) :
+ context.Message("Checking for Objective-C header " + header + " ... ")
+ ret = context.TryCompile("#include <Cocoa/Cocoa.h>\n#include <" + header + ">", ".m")
+ context.Result(ret)
+ return ret
+
################################################################################
# Platform configuration
################################################################################
@@ -165,6 +171,9 @@ if ARGUMENTS.get("force-configure", 0) :
conf = Configure(conf_env)
+conf.CheckCXX()
+conf.CheckCC()
+
if conf.CheckLib("z") :
env.Append(LIBS = "z")
env["ZLIB_FLAGS"] = ""
@@ -202,6 +211,21 @@ if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" :
env["XSS_FLAGS"] = xss_flags
conf.Finish()
+# Sparkle
+env["HAVE_SPARKLE"] = 0
+if env["PLATFORM"] == "darwin" :
+ sparkle_flags = {
+ "FRAMEWORKPATH": ["/Library/Frameworks"],
+ "FRAMEWORKS": ["Sparkle"]
+ }
+ sparkle_env = conf_env.Clone()
+ sparkle_env.MergeFlags(sparkle_flags)
+ conf = Configure(sparkle_env, custom_tests = { "CheckObjCHeader" : checkObjCHeader })
+ if conf.CheckObjCHeader("Sparkle/Sparkle.h") :
+ env["HAVE_SPARKLE"] = 1
+ env["SPARKLE_FLAGS"] = sparkle_flags
+ conf.Finish()
+
# LibXML
conf = Configure(conf_env)
if conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") :