mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
Merge "{ios,xcframework}build.sh: make min version(s) more visible" into 1.2.0
This commit is contained in:
commit
8af7436f10
@ -13,6 +13,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Set this variable based on the desired minimum deployment target.
|
||||
readonly IOS_MIN_VERSION=6.0
|
||||
|
||||
# Extract the latest SDK version from the final field of the form: iphoneosX.Y
|
||||
readonly SDK=$(xcodebuild -showsdks \
|
||||
| grep iphoneos | sort | tail -n 1 | awk '{print substr($NF, 9)}'
|
||||
@ -118,7 +121,7 @@ for PLATFORM in ${PLATFORMS}; do
|
||||
SDKROOT="${PLATFORMSROOT}/"
|
||||
SDKROOT+="${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDK}.sdk/"
|
||||
CFLAGS="-arch ${ARCH2:-${ARCH}} -pipe -isysroot ${SDKROOT} -O3 -DNDEBUG"
|
||||
CFLAGS+=" -miphoneos-version-min=6.0 ${EXTRA_CFLAGS}"
|
||||
CFLAGS+=" -miphoneos-version-min=${IOS_MIN_VERSION} ${EXTRA_CFLAGS}"
|
||||
|
||||
set -x
|
||||
export PATH="${DEVROOT}/usr/bin:${OLDPATH}"
|
||||
|
@ -12,6 +12,11 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Set these variables based on the desired minimum deployment target.
|
||||
readonly IOS_MIN_VERSION=6.0
|
||||
readonly MACOSX_MIN_VERSION=10.15
|
||||
readonly MACOSX_CATALYST_MIN_VERSION=13.0
|
||||
|
||||
# Extract Xcode version.
|
||||
readonly XCODE=$(xcodebuild -version | grep Xcode | cut -d " " -f2)
|
||||
if [[ -z "${XCODE}" ]] || [[ "${XCODE%%.*}" -lt 11 ]]; then
|
||||
@ -135,10 +140,14 @@ for (( i = 0; i < $NUM_PLATFORMS; ++i )); do
|
||||
CFLAGS="-pipe -isysroot ${SDKROOT} -O3 -DNDEBUG"
|
||||
case "${PLATFORM}" in
|
||||
iPhone*)
|
||||
CFLAGS+=" -miphoneos-version-min=6.0 -fembed-bitcode"
|
||||
CFLAGS+=" -miphoneos-version-min=${IOS_MIN_VERSION} -fembed-bitcode"
|
||||
;;
|
||||
MacOSX-Catalyst*)
|
||||
CFLAGS+=" -target ${ARCH}-apple-ios13.0-macabi"
|
||||
CFLAGS+=" -target"
|
||||
CFLAGS+=" ${ARCH}-apple-ios${MACOSX_CATALYST_MIN_VERSION}-macabi"
|
||||
;;
|
||||
MacOSX*)
|
||||
CFLAGS+=" -mmacosx-version-min=${MACOSX_MIN_VERSION}"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user