Files
DisplayFlow/scripts/build.sh
huanglinhuan 91ae52eeb3 暂存文件
2025-12-12 21:54:52 +08:00

28 lines
449 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 构建脚本Linux/macOS
set -e
BUILD_TYPE=${1:-Release}
BUILD_DIR="build-${BUILD_TYPE,,}"
echo "Building DisplayFlow in $BUILD_TYPE mode..."
# 创建构建目录
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
# 配置 CMake
cmake .. \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DBUILD_TESTS=ON \
-DENABLE_VP8_CODEC=OFF
# 编译
cmake --build . --config "$BUILD_TYPE" -j$(nproc)
echo "Build complete! Output in $BUILD_DIR/"