Skip to content

Commit

Permalink
Allow building libgit2 with Chromium zlib (libgit2#831)
Browse files Browse the repository at this point in the history
This change allows the caller to set the `USE_CHROMIUM_ZLIB=ON`
environment variable to use the Chromium implementation of zlib when
building libgit2.
  • Loading branch information
lhchavez authored Sep 6, 2021
1 parent c8ce59d commit c6da3b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions script/build-libgit2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit c6da3b9

Please # to comment.