forked from OpenVisualCloud/Media-Communications-Mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·25 lines (20 loc) · 825 Bytes
/
build.sh
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
#!/bin/bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2024 Intel Corporation
set -eo pipefail
SCRIPT_DIR="$(readlink -f "$(dirname -- "${BASH_SOURCE[0]}")")"
. "${SCRIPT_DIR}/common.sh"
# Set build type. ("Debug" or "Release")
BUILD_TYPE="${BUILD_TYPE:-Release}"
# To disable the building of unit tests, set the value to "OFF".
BUILD_UNIT_TESTS="${BUILD_UNIT_TESTS:-ON}"
INSTALL_PREFIX="${INSTALL_PREFIX:-/usr/local}"
cmake -B "${SCRIPT_DIR}/out" \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DBUILD_UNIT_TESTS="${BUILD_UNIT_TESTS}" \
"${SCRIPT_DIR}"
cmake --build "${SCRIPT_DIR}/out" -j
# Install
run_as_root_user cmake --install "${SCRIPT_DIR}/out"
run_as_root_user ln -s /usr/lib64/libbpf.so.1 /usr/lib/x86_64-linux-gnu/libbpf.so.1 2>/dev/null || true