-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildServer.sh
executable file
·31 lines (24 loc) · 969 Bytes
/
buildServer.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
26
27
28
29
30
31
#!/bin/bash
# Name of the build directory
BUILD_DIR="build"
# Check if the build directory exists
if [ ! -d "$BUILD_DIR" ]; then
echo "Build directory does not exist. Creating it..."
mkdir "$BUILD_DIR"
fi
# Navigate to the build directory
cd "$BUILD_DIR"
# Check if the CMakeCache.txt exists and if BUILD_SERVER is correctly configured
if [ ! -f "CMakeCache.txt" ] || ! grep -q "BUILD_SERVER:BOOL=ON" CMakeCache.txt; then
echo "CMakeCache.txt does not exist or configuration changed. Running CMake..."
cmake -DTARGET_ARCH=x86_64 -DTARGET_OS=linux -DBUILD_SERVER:BOOL=ON -DBUILD_SERVER=ON -DDEBUG_MODE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF ..
else
echo "CMakeCache.txt found and configuration is valid. Skipping CMake reconfiguration."
fi
# Build the project
echo "Building the project..."
make -j$(nproc)
# Navigate back to the root project directory
cd ..
echo "Build process completed."
export AVAHI_COMPAT_NOWARN=y