diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 36928fb290..37d1de1fd4 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -536,6 +536,8 @@ function setup_static_lib_project (project_name, rel_source_dirs, extern_libs, e 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 +562,8 @@ function setup_shared_lib_project (project_name, rel_source_dirs, extern_libs, e 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 +1038,9 @@ function setup_main_exe () 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 +1425,9 @@ function setup_tests() 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 diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index 67d0bd2421..2930a8b3fd 100644 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -125,7 +125,7 @@ if [ "`uname -s`" != "Darwin" ]; then else premake5/bin/release/premake5 --file="premake5.lua" --outpath="../workspaces/gcc/" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} gmake || die "Premake failed" # Also generate xcode workspaces if on OS X - premake5/bin/release/premake5 --file="premake5.lua" --outpath="../workspaces/xcode4" ${premake_args} xcode4 || die "Premake failed" + premake5/bin/release/premake5 --file="premake5.lua" --outpath="../workspaces/xcode4" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} xcode4 || die "Premake failed" fi # test_root.cpp gets generated by cxxtestgen and passing different arguments to premake could require a regeneration of this file.