build: Support more macOS SDKs

This commit is contained in:
Matt Borgerson 2021-10-11 18:08:04 -07:00 committed by mborgerson
parent af70a13f8c
commit 5cfb6c2b02
1 changed files with 12 additions and 2 deletions

View File

@ -180,9 +180,15 @@ case "$platform" in # Adjust compilation options based on platform
sdk_macos_10_14="${sdk_base}/MacOSX10.14.sdk"
sdk_macos_10_15="${sdk_base}/MacOSX10.15.sdk"
sdk_macos_11_1="${sdk_base}/MacOSX11.1.sdk"
sdk_macos_11_3="${sdk_base}/MacOSX11.3.sdk"
sdk_macos_12_0="${sdk_base}/MacOSX12.0.sdk"
if [ "$target_arch" == "arm64" ]; then
macos_min_ver=11.1
if test -d "$sdk_macos_11_1"; then
if test -d "$sdk_macos_12_0"; then
sdk="$sdk_macos_12_0"
elif test -d "$sdk_macos_11_3"; then
sdk="$sdk_macos_11_3"
elif test -d "$sdk_macos_11_1"; then
sdk="$sdk_macos_11_1"
else
echo "SDK not found. Install Xcode Command Line Tools"
@ -190,7 +196,11 @@ case "$platform" in # Adjust compilation options based on platform
fi
elif [ "$target_arch" == "x86_64" ]; then
macos_min_ver=10.13
if test -d "$sdk_macos_11_1"; then
if test -d "$sdk_macos_12_0"; then
sdk="$sdk_macos_12_0"
elif test -d "$sdk_macos_11_3"; then
sdk="$sdk_macos_11_3"
elif test -d "$sdk_macos_11_1"; then
sdk="$sdk_macos_11_1"
elif test -d "$sdk_macos_10_15"; then
sdk="$sdk_macos_10_15"