Index: build/premake/premake5.lua =================================================================== --- build/premake/premake5.lua +++ build/premake/premake5.lua @@ -33,6 +33,11 @@ -- Root directory of project checkout relative to this .lua file rootdir = "../.." +-- Target build version explicitly for Xcode +if os.istarget("macosx") and not _OPTIONS["macosx-version-min"] then + _OPTIONS["macosx-version-min"] = "${MIN_OSX_VERSION}" +end + dofile("extern_libs5.lua") -- detect compiler for non-Windows @@ -536,6 +541,8 @@ if os.istarget("windows") then rtti "off" + elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then + xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } end end @@ -560,6 +567,8 @@ if os.istarget("windows") then rtti "off" links { "delayimp" } + elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then + xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } end end @@ -1034,7 +1043,9 @@ links { "pthread" } links { "ApplicationServices.framework", "Cocoa.framework", "CoreFoundation.framework" } - + if _OPTIONS["macosx-version-min"] then + xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } + end end end @@ -1419,6 +1430,9 @@ filter { } includedirs { source_root .. "pch/test/" } + + elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then + xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } end end