From d23f3046f26b75e84245b3cb1aa50c14fb534b33 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Tue, 25 May 2010 17:13:28 +0100 Subject: Add a mac105 option for building against OS X 10.5 frameworks. Resolves: #387 diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index f210650..8b27722 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -22,6 +22,7 @@ if os.name == "posix" : vars.Add(BoolVariable("valgrind", "Run tests with valgrind", "no")) if os.name == "mac" or (os.name == "posix" and os.uname()[0] == "Darwin"): vars.Add(BoolVariable("universal", "Create universal binaries", "no")) + vars.Add(BoolVariable("mac105", "Link against the 10.5 frameworks", "no")) if os.name == "nt" : vars.Add(PathVariable("vcredist", "MSVC redistributable dir", "", PathVariable.PathAccept)) if os.name == "nt" : @@ -94,6 +95,17 @@ if env.get("universal", 0) : "-arch", "i386", "-arch", "ppc"]) +if env.get("mac105", 0) : + assert(env["PLATFORM"] == "darwin") + env.Append(CCFLAGS = [ + "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk", + "-arch", "i386"]) + env.Append(LINKFLAGS = [ + "-mmacosx-version-min=10.4", + "-Wl", "-syslibroot,/Developer/SDKs/MacOSX10.5.sdk", + "-arch", "i386"]) + + if env["warnings"] : if env["PLATFORM"] == "win32" : env.Append(CCFLAGS = ["/Wall"]) -- cgit v0.10.2-6-g49f6