aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rolf Eike Beer <eike@sf-mail.de>2019-03-20 22:16:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-03-21 19:30:14 -0700
commitd104506f982955c7486a1bd931ba4fc98a516b5c (patch)
treeef520d160d1984781460ae127f25699fd995e9f9
parent3b3306c552c89196da60fbbc70b7a7e50e81f541 (diff)
downloadsubsurface-d104506f982955c7486a1bd931ba4fc98a516b5c.tar.gz
CMake: use builtin method to not use BZip2
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
-rwxr-xr-xpackaging/android/build.sh3
-rwxr-xr-xpackaging/ios/build.sh3
2 files changed, 4 insertions, 2 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 1cf013ead..8b5459980 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -268,7 +268,7 @@ if [ "$QUICK" = "" ] ; then
git reset --hard
sed -i 's/SIZEOF_SIZE_T/__SIZEOF_SIZE_T__/g' lib/compat.h
# also, don't deal with manuals and bzip2
- sed -i 's/ADD_SUBDIRECTORY(man)//;s/FIND_PACKAGE(BZip2)/# FIND_PACKAGE(BZip2)/' CMakeLists.txt
+ sed -i 's/ADD_SUBDIRECTORY(man)//' CMakeLists.txt
popd
mkdir -p libzip-build-"$ARCH"
pushd libzip-build-"$ARCH"
@@ -278,6 +278,7 @@ if [ "$QUICK" = "" ] ; then
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DBUILD_SHARED_LIBS=OFF \
+ -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE \
../libzip/
make
make install
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index 5286a3631..0d955ebc7 100755
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -152,13 +152,14 @@ for ARCH in $ARCHS; do
if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then
pushd ${SSRF_CLONE}/libzip
# don't waste time on building command line tools, examples, manual, and regression tests - and don't build the BZIP2 support we don't need
- sed -i.bak 's/ADD_SUBDIRECTORY(src)//;s/ADD_SUBDIRECTORY(examples)//;s/ADD_SUBDIRECTORY(man)//;s/ADD_SUBDIRECTORY(regress)//;s/FIND_PACKAGE(BZip2)/# FIND_PACKAGE(BZip2)/' CMakeLists.txt
+ sed -i.bak 's/ADD_SUBDIRECTORY(src)//;s/ADD_SUBDIRECTORY(examples)//;s/ADD_SUBDIRECTORY(man)//;s/ADD_SUBDIRECTORY(regress)//' CMakeLists.txt
mkdir -p build-ios/libzip-build-$ARCH_NAME
pushd build-ios/libzip-build-$ARCH_NAME
cmake -DBUILD_SHARED_LIBS="OFF" \
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_PREFIX_PATH=${PREFIX} \
+ -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE \
${SSRF_CLONE}/libzip
# quiet the super noise warnings
sed -i.bak 's/C_FLAGS = /C_FLAGS = -Wno-nullability-completeness -Wno-expansion-to-defined /' lib/CMakeFiles/zip.dir/flags.make