aboutsummaryrefslogtreecommitdiff
path: root/extra/brotli/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2023-10-13 11:53:21 +0200
committerCem Keylan <cem@ckyln.com>2023-10-13 11:53:21 +0200
commitf63856754e6e78165e4e091eebd514b288b19d77 (patch)
tree0b2aba6652036419d548b09a428c97505bd5902a /extra/brotli/build
parent134d6203921abbde3840368e3ab4a4c4de450cf9 (diff)
downloadrepository-f63856754e6e78165e4e091eebd514b288b19d77.tar.gz
brotli: add static libraries, and compile the binary statically
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"