macOS stuff updated

Builds with some warnings, but the client is a sole blackscreen for me.
This commit is contained in:
John Behm 2018-10-15 19:50:36 +02:00 committed by GitHub
parent 9937b2b478
commit dd37d55753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

16
bam.lua
View file

@ -8,7 +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.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk"))
config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.7 -isysroot /Developer/SDKs/MacOSX10.7.sdk"))
config:Add(OptLibrary("zlib", "zlib.h", false))
config:Add(SDL.OptFind("sdl", true))
config:Add(FreeType.OptFind("freetype", true))
@ -120,11 +120,17 @@ function GenerateMacOSXSettings(settings, conf, arch, compiler)
os.exit(1)
end
settings.cc.flags:Add("-mmacosx-version-min=10.6")
settings.link.flags:Add("-mmacosx-version-min=10.6")
-- c++ stdlib needed
settings.cc.flags:Add("--stdlib=libc++")
settings.link.flags:Add("--stdlib=libc++")
-- this also needs the macOS min SDK version to be at least 10.7
settings.cc.flags:Add("-mmacosx-version-min=10.7")
settings.link.flags:Add("-mmacosx-version-min=10.7")
if config.minmacosxsdk.value == 1 then
settings.cc.flags:Add("-isysroot /Developer/SDKs/MacOSX10.6.sdk")
settings.link.flags:Add("-isysroot /Developer/SDKs/MacOSX10.6.sdk")
settings.cc.flags:Add("-isysroot /Developer/SDKs/MacOSX10.7.sdk")
settings.link.flags:Add("-isysroot /Developer/SDKs/MacOSX10.7.sdk")
end
settings.link.frameworks:Add("Carbon")