diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-27 21:50:54 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-27 21:50:54 (GMT) |
commit | 05fa7a57b3c7df3a9cc717cba202c96be05fa21a (patch) | |
tree | 70ddc33247920490c946bd73421083851dcaef31 /SConstruct | |
parent | aa09a889108c4d0e3c5888ad98958d8f3e12bd3b (diff) | |
download | swift-05fa7a57b3c7df3a9cc717cba202c96be05fa21a.zip swift-05fa7a57b3c7df3a9cc717cba202c96be05fa21a.tar.bz2 |
Added (Sparkle) AutoUpdater.
Not plugged into Swift yet.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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") : |