暂存文件
This commit is contained in:
27
scripts/build.sh
Normal file
27
scripts/build.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/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/"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user