From 8f8053de3d8addab040f613fc5999203694cdd08 Mon Sep 17 00:00:00 2001 From: H-M-H Date: Sun, 22 Nov 2015 15:23:10 +0100 Subject: [PATCH] fixed mysql compiling on mac --- bam.lua | 12 +++++++----- other/mysql/mysql.lua | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bam.lua b/bam.lua index b0e45a8f1..f2637e1dc 100644 --- a/bam.lua +++ b/bam.lua @@ -26,7 +26,7 @@ Import("other/mysql/mysql.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(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.7 -isysroot /Developer/SDKs/MacOSX10.7.sdk")) config:Add(OptTestCompileC("macosxppc", "int main(){return 0;}", "-arch ppc")) config:Add(OptLibrary("zlib", "zlib.h", false)) config:Add(SDL.OptFind("sdl", true)) @@ -235,11 +235,13 @@ 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") - settings.link.flags:Add("-mmacosx-version-min=10.5") + settings.cc.flags:Add("-mmacosx-version-min=10.7") + settings.link.flags:Add("-mmacosx-version-min=10.7") + settings.cc.flags:Add("-stdlib=libc++") + settings.link.flags:Add("-stdlib=libc++") 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") + settings.cc.flags:Add("-isysroot /Developer/SDKs/MacOSX10.7.sdk") + settings.link.flags:Add("-isysroot /Developer/SDKs/MacOSX10.7.sdk") end elseif config.stackprotector.value == 1 then settings.cc.flags:Add("-fstack-protector", "-fstack-protector-all") diff --git a/other/mysql/mysql.lua b/other/mysql/mysql.lua index dfd6ff8a2..20dcb6d8b 100644 --- a/other/mysql/mysql.lua +++ b/other/mysql/mysql.lua @@ -50,7 +50,9 @@ Mysql = { settings.link.libs:Add("mysqlcppconn-static") settings.link.libs:Add("mysqlclient") settings.link.libs:Add("dl") - settings.link.libs:Add("rt") + if platform ~= "macosx" then + settings.link.libs:Add("rt") + end end if platform == "macosx" and string.find(settings.config_name, "32") then