-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild_meson.sh
More file actions
executable file
·55 lines (48 loc) · 1.59 KB
/
build_meson.sh
File metadata and controls
executable file
·55 lines (48 loc) · 1.59 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
# Copyright (C) 2025-2026 Intel Corporation
# SPDX-License-Identifier: MIT
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BUILD_DIR="${SCRIPT_DIR}/builddir"
BUILD_TYPE="${1:-release}"
echo "=================================================="
echo "Building vsyncalter with Meson (Linux)"
echo "=================================================="
echo "Build type: ${BUILD_TYPE}"
echo ""
# Clean existing build directory if requested
if [[ "${2:-}" == "clean" ]]; then
echo "Cleaning existing build directory..."
rm -rf "${BUILD_DIR}"
fi
# Configure if needed
if [[ ! -d "${BUILD_DIR}" ]]; then
echo "Configuring..."
meson setup "${BUILD_DIR}" \
--buildtype="${BUILD_TYPE}" \
--prefix=/usr/local \
-Dbuild_shared_libs=true \
-Dbuild_swgenlock=true \
-Dbuild_pllctl=true \
-Dbuild_vblmon=true \
-Dbuild_framesync=true \
-Denable_coverage=false
echo ""
else
echo "Build directory exists. Ensuring code coverage is disabled..."
meson configure "${BUILD_DIR}" -Denable_coverage=false
echo ""
fi
# Build
echo "Building..."
meson compile -C "${BUILD_DIR}"
echo ""
echo "=================================================="
echo "Build complete!"
echo "=================================================="
echo "Binaries location:"
echo " - Library: ${BUILD_DIR}/lib/"
echo " - pllctl: ${BUILD_DIR}/pllctl/pllctl"
echo " - vblmon: ${BUILD_DIR}/vblmon/vblmon"
echo " - swgenlock: ${BUILD_DIR}/swgenlock/swgenlock"
echo " - framesync: ${BUILD_DIR}/framesync/framesync"