mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 21:28:22 +01:00
iosbuild.sh: sync some aspects of xcframeworkbuild.sh
Change-Id: Ie29f986767132fe980d71e43f6b8d367a9e2e6a9
This commit is contained in:
parent
e8e8db985a
commit
319f56f1a1
33
iosbuild.sh
33
iosbuild.sh
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# This script generates 'WebP.framework' and 'WebPDecoder.framework'. An iOS
|
# This script generates 'WebP.framework' and 'WebPDecoder.framework',
|
||||||
# app can decode WebP images by including 'WebPDecoder.framework' and both
|
# 'WebPDemux.framework' and 'WebPMux.framework'.
|
||||||
# encode and decode WebP images by including 'WebP.framework'.
|
# An iOS app can decode WebP images by including 'WebPDecoder.framework' and
|
||||||
|
# both encode and decode WebP images by including 'WebP.framework'.
|
||||||
#
|
#
|
||||||
# Run ./iosbuild.sh to generate the frameworks under the current directory
|
# Run ./iosbuild.sh to generate the frameworks under the current directory
|
||||||
# (the previous build will be erased if it exists).
|
# (the previous build will be erased if it exists).
|
||||||
@ -50,13 +51,27 @@ if [[ -z "${SDK}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
elif [[ ${SDK%%.*} -gt 8 ]]; then
|
elif [[ ${SDK%%.*} -gt 8 ]]; then
|
||||||
EXTRA_CFLAGS="-fembed-bitcode"
|
EXTRA_CFLAGS="-fembed-bitcode"
|
||||||
elif [[ ${SDK} < 6.0 ]]; then
|
elif [[ ${SDK%%.*} -le 6 ]]; then
|
||||||
echo "You need iOS SDK version 6.0 or above"
|
echo "You need iOS SDK version 6.0 or above"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
echo "iOS SDK Version ${SDK}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Xcode Version: ${XCODE}"
|
||||||
|
echo "iOS SDK Version: ${SDK}"
|
||||||
|
|
||||||
|
if [[ -e "${BUILDDIR}" || -e "${TARGETDIR}" || -e "${DECTARGETDIR}" \
|
||||||
|
|| -e "${MUXTARGETDIR}" || -e "${DEMUXTARGETDIR}" ]]; then
|
||||||
|
cat << EOF
|
||||||
|
WARNING: The following directories will be deleted:
|
||||||
|
WARNING: ${BUILDDIR}
|
||||||
|
WARNING: ${TARGETDIR}
|
||||||
|
WARNING: ${DECTARGETDIR}
|
||||||
|
WARNING: ${MUXTARGETDIR}
|
||||||
|
WARNING: ${DEMUXTARGETDIR}
|
||||||
|
WARNING: The build will continue in 5 seconds...
|
||||||
|
EOF
|
||||||
|
sleep 5
|
||||||
|
fi
|
||||||
rm -rf ${BUILDDIR} ${TARGETDIR} ${DECTARGETDIR} \
|
rm -rf ${BUILDDIR} ${TARGETDIR} ${DECTARGETDIR} \
|
||||||
${MUXTARGETDIR} ${DEMUXTARGETDIR}
|
${MUXTARGETDIR} ${DEMUXTARGETDIR}
|
||||||
mkdir -p ${BUILDDIR} ${TARGETDIR}/Headers/ ${DECTARGETDIR}/Headers/ \
|
mkdir -p ${BUILDDIR} ${TARGETDIR}/Headers/ ${DECTARGETDIR}/Headers/ \
|
||||||
@ -64,12 +79,12 @@ mkdir -p ${BUILDDIR} ${TARGETDIR}/Headers/ ${DECTARGETDIR}/Headers/ \
|
|||||||
|
|
||||||
if [[ ! -e ${SRCDIR}/configure ]]; then
|
if [[ ! -e ${SRCDIR}/configure ]]; then
|
||||||
if ! (cd ${SRCDIR} && sh autogen.sh); then
|
if ! (cd ${SRCDIR} && sh autogen.sh); then
|
||||||
cat <<EOT
|
cat << EOF
|
||||||
Error creating configure script!
|
Error creating configure script!
|
||||||
This script requires the autoconf/automake and libtool to build. MacPorts can
|
This script requires the autoconf/automake and libtool to build. MacPorts can
|
||||||
be used to obtain these:
|
be used to obtain these:
|
||||||
http://www.macports.org/install.php
|
http://www.macports.org/install.php
|
||||||
EOT
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -148,3 +163,5 @@ echo "DEMUXLIBLIST = ${DEMUXLIBLIST}"
|
|||||||
cp -a ${SRCDIR}/src/webp/{decode,types,mux_types,demux}.h \
|
cp -a ${SRCDIR}/src/webp/{decode,types,mux_types,demux}.h \
|
||||||
${DEMUXTARGETDIR}/Headers/
|
${DEMUXTARGETDIR}/Headers/
|
||||||
${LIPO} -create ${DEMUXLIBLIST} -output ${DEMUXTARGETDIR}/WebPDemux
|
${LIPO} -create ${DEMUXLIBLIST} -output ${DEMUXTARGETDIR}/WebPDemux
|
||||||
|
|
||||||
|
echo "SUCCESS"
|
||||||
|
Loading…
Reference in New Issue
Block a user