Allow building libgit2 with Chromium zlib (#831)

This change allows the caller to set the `USE_CHROMIUM_ZLIB=ON`
environment variable to use the Chromium implementation of zlib when
building libgit2.

(cherry picked from commit c6da3b97a8)
This commit is contained in:
lhchavez 2021-09-06 05:13:55 -07:00 committed by lhchavez
parent 70e5e419cf
commit e9dc549403
1 changed files with 6 additions and 0 deletions

View File

@ -61,12 +61,18 @@ else
mkdir -p "${BUILD_PATH}/install/lib"
fi
USE_BUNDLED_ZLIB="ON"
if [ "${USE_CHROMIUM_ZLIB}" = "ON" ]; then
USE_BUNDLED_ZLIB="Chromium"
fi
mkdir -p "${BUILD_PATH}/build" &&
cd "${BUILD_PATH}/build" &&
cmake -DTHREADSAFE=ON \
-DBUILD_CLAR=OFF \
-DBUILD_SHARED_LIBS"=${BUILD_SHARED_LIBS}" \
-DREGEX_BACKEND=builtin \
-DUSE_BUNDLED_ZLIB="${USE_BUNDLED_ZLIB}" \
-DUSE_HTTPS=OFF \
-DUSE_SSH=OFF \
-DCMAKE_C_FLAGS=-fPIC \