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.
This commit is contained in:
lhchavez 2021-09-06 05:13:55 -07:00 committed by GitHub
parent c8ce59d4eb
commit c6da3b97a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 \