File: make-shared-library.sh

package info (click to toggle)
cpp-httplib 0.25.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,708 kB
  • sloc: cpp: 19,322; makefile: 176; python: 50; sh: 50
file content (28 lines) | stat: -rwxr-xr-x 464 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
    echo "Usage: $0 build_dir"
    exit 1
fi

BUILD_DIR=$1

# Make the build directory
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR/out

cd $BUILD_DIR

# Build the version
git checkout $BUILD_DIR -q

cmake \
  -DCMAKE_BUILD_TYPE=Debug \
  -DCMAKE_CXX_FLAGS="-g -Og" \
  -DBUILD_SHARED_LIBS=ON \
  -DHTTPLIB_COMPILE=ON \
  -DCMAKE_INSTALL_PREFIX=./out \
  ../..

cmake --build . --target install
cmake --build . --target clean