mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 21:28:22 +01:00
Updated iosbuild.sh for XCode 5.x
Change-Id: I4bf545c4f394c28842cbb85ac70214d2e5477ae0
This commit is contained in:
parent
cb261f790f
commit
e812401299
23
iosbuild.sh
23
iosbuild.sh
@ -15,6 +15,9 @@ set -e
|
|||||||
declare -r SDK=$(xcodebuild -showsdks \
|
declare -r SDK=$(xcodebuild -showsdks \
|
||||||
| grep iphoneos | sort | tail -n 1 | awk '{print substr($NF, 9)}'
|
| grep iphoneos | sort | tail -n 1 | awk '{print substr($NF, 9)}'
|
||||||
)
|
)
|
||||||
|
# Extract Xcode version.
|
||||||
|
declare -r XCODE=$(xcodebuild -version | grep Xcode | cut -d " " -f2)
|
||||||
|
|
||||||
declare -r OLDPATH=${PATH}
|
declare -r OLDPATH=${PATH}
|
||||||
|
|
||||||
# Add iPhoneOS-V6 to the list of platforms below if you need armv6 support.
|
# Add iPhoneOS-V6 to the list of platforms below if you need armv6 support.
|
||||||
@ -63,12 +66,24 @@ for PLATFORM in ${PLATFORMS}; do
|
|||||||
ROOTDIR="${BUILDDIR}/${PLATFORM}-${SDK}-${ARCH}"
|
ROOTDIR="${BUILDDIR}/${PLATFORM}-${SDK}-${ARCH}"
|
||||||
mkdir -p "${ROOTDIR}"
|
mkdir -p "${ROOTDIR}"
|
||||||
|
|
||||||
export DEVROOT="${PLATFORMSROOT}/${PLATFORM}.platform/Developer"
|
SDKROOT="${PLATFORMSROOT}/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDK}.sdk/"
|
||||||
export SDKROOT="${DEVROOT}/SDKs/${PLATFORM}${SDK}.sdk"
|
CFLAGS="-arch ${ARCH} -pipe -isysroot ${SDKROOT}"
|
||||||
|
LDFLAGS="-arch ${ARCH} -pipe -isysroot ${SDKROOT}"
|
||||||
|
|
||||||
export CFLAGS="-arch ${ARCH} -pipe -isysroot ${SDKROOT}"
|
if [[ -z "${XCODE}" ]]; then
|
||||||
|
echo "XCODE not available"
|
||||||
|
exit 1
|
||||||
|
elif [[ ${SDK} < 5.0.0 ]]; then
|
||||||
|
DEVROOT="${PLATFORMSROOT}/${PLATFORM}.platform/Developer/"
|
||||||
|
else
|
||||||
|
DEVROOT="${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain"
|
||||||
|
CFLAGS+=" -miphoneos-version-min=5.0"
|
||||||
|
LDFLAGS+=" -miphoneos-version-min=5.0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CFLAGS
|
||||||
|
export LDFLAGS
|
||||||
export CXXFLAGS=${CFLAGS}
|
export CXXFLAGS=${CFLAGS}
|
||||||
export LDFLAGS="-arch ${ARCH} -pipe -isysroot ${SDKROOT}"
|
|
||||||
export PATH="${DEVROOT}/usr/bin:${OLDPATH}"
|
export PATH="${DEVROOT}/usr/bin:${OLDPATH}"
|
||||||
|
|
||||||
${SRCDIR}/configure --host=${ARCH}-apple-darwin --prefix=${ROOTDIR} \
|
${SRCDIR}/configure --host=${ARCH}-apple-darwin --prefix=${ROOTDIR} \
|
||||||
|
Loading…
Reference in New Issue
Block a user