-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
33 lines (25 loc) · 934 Bytes
/
build.sh
File metadata and controls
33 lines (25 loc) · 934 Bytes
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
29
30
31
32
33
#!/usr/bin/env bash
set -e
export http_proxy="http://192.168.58.72:7890"
export https_proxy="http://192.168.58.72:7890"
# Configuration
BUILD_SHARED_LIBS="ON"
if [ "$BUILD_SHARED_LIBS" = "ON" ]; then
BUILD_DIR="build_shared"
else
BUILD_DIR="build_static"
fi
# Print configuration info
echo -e "\033[0;36mConfiguring project ($BUILD_DIR)...\033[0m"
# Build options
# -DCMAKE_BUILD_TYPE=Release is required for single-config generators (like Unix Makefiles)
# ENABLE_GPU=ON to use GPU version of ONNX Runtime as specified in onnxruntime.cmake
cmake -B "$BUILD_DIR" -S . \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS="$BUILD_SHARED_LIBS" \
-DENABLE_GPU=OFF \
-DENABLE_PYTHON=OFF
echo -e "\n\033[0;36m--- Building vad-filter-onnx ---\033[0m"
# Build the project using all available cores
cmake --build "$BUILD_DIR" --config Release -j$(nproc)
echo -e "\033[0;32mBuild completed successfully!\033[0m"