aboutsummaryrefslogtreecommitdiff
path: root/extra/brotli/build
diff options
context:
space:
mode:
Diffstat (limited to 'extra/brotli/build')
-rwxr-xr-xextra/brotli/build24
1 files changed, 16 insertions, 8 deletions
diff --git a/extra/brotli/build b/extra/brotli/build
index d44a1f51..3d8522d4 100755
--- a/extra/brotli/build
+++ b/extra/brotli/build
@@ -2,11 +2,19 @@
export DESTDIR="$1"
-cmake -B build \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DBUILD_SHARED_LIBS=True
-
-cmake --build build
-cmake --install build
+shared() {
+ LIBS=$1; shift
+ cmake -B build \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_TESTING=OFF \
+ -DBUILD_SHARED_LIBS="$LIBS" \
+ "$@"
+
+ cmake --build build
+ cmake --install build
+}
+
+shared ON
+shared OFF -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -static"