about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-06-10 19:56:23 +0200
committeroy <Tom_Adams@web.de>2013-02-24 17:37:22 +0100
commit56ae76f46574506fa2b28fbf2fdf5672ae5866c6 (patch)
tree12c218a5b6ff4d624f0b1ce39fc1ecc7ba59024d
parent4e4019986a763326952719f26798f3184325ce40 (diff)
downloadzcatch-56ae76f46574506fa2b28fbf2fdf5672ae5866c6.tar.gz
zcatch-56ae76f46574506fa2b28fbf2fdf5672ae5866c6.zip
made building tw with the SDK of the minimum mac os x version a config option. #964
-rw-r--r--bam.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/bam.lua b/bam.lua
index 9585bac8..c8157426 100644
--- a/bam.lua
+++ b/bam.lua
@@ -8,6 +8,7 @@ Import("other/freetype/freetype.lua")
 config = NewConfig()
 config:Add(OptCCompiler("compiler"))
 config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all"))
+config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk"))
 config:Add(OptLibrary("zlib", "zlib.h", false))
 config:Add(SDL.OptFind("sdl", true))
 config:Add(FreeType.OptFind("freetype", true))
@@ -149,8 +150,12 @@ function build(settings)
 			-- disable visibility attribute support for gcc on windows
 			settings.cc.defines:Add("NO_VIZ")
 		elseif platform == "macosx" then
-			settings.cc.flags:Add("-mmacosx-version-min=10.5", "-isysroot /Developer/SDKs/MacOSX10.5.sdk")
-			settings.link.flags:Add("-mmacosx-version-min=10.5", "-isysroot /Developer/SDKs/MacOSX10.5.sdk")
+			settings.cc.flags:Add("-mmacosx-version-min=10.5")
+			settings.link.flags:Add("-mmacosx-version-min=10.5")
+			if config.minmacosxsdk.value == 1 then
+				settings.cc.flags:Add("-isysroot /Developer/SDKs/MacOSX10.5.sdk")
+				settings.link.flags:Add("-isysroot /Developer/SDKs/MacOSX10.5.sdk")
+			end
 		elseif config.stackprotector.value == 1 then
 			settings.cc.flags:Add("-fstack-protector", "-fstack-protector-all")
 			settings.link.flags:Add("-fstack-protector", "-fstack-protector-all")