-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathinstall_tracy.sh
executable file
·55 lines (45 loc) · 1.58 KB
/
install_tracy.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
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
. config.sh # source configuration file and utils
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # get script dir (this should be the main folder directory of PLVS)
SCRIPT_DIR=$(readlink -f $SCRIPT_DIR) # this reads the actual path if a symbolic directory is used
cd $SCRIPT_DIR # this brings us in the actual used folder (not the possibly symbolic one)
EXTERNAL_OPTION=$1
if [[ -n "$EXTERNAL_OPTION" ]]; then
echo "external option: $EXTERNAL_OPTION"
fi
print_blue '================================================'
print_blue "Configuring and building thirdparty/tracy ..."
TRACY_INSTALL_PATH=$SCRIPT_DIR/thirdparty/tracy/install
cd thirdparty
if [ ! -d "tracy" ]; then
sudo apt install -y libtbb-dev wayland-scanner++ waylandpp-dev libglfw3-dev libdbus-1-dev
git clone https://github.com/wolfpld/tracy.git
cd tracy
git checkout tags/v0.11.0
#git checkout ffb98a972401c246b2348fb5341252e2ba855d00
git apply ../tracy.patch
cd ..
fi
cd tracy
if [ ! -d build ]; then
mkdir build
fi
if [[ ! -f $TRACY_INSTALL_PATH/lib/libTracyClient.a ]]; then
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$TRACY_INSTALL_PATH" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fPIC"
make -j 10
make install
cd ..
fi
if [[ ! -f $SCRIPT_DIR/thirdparty/tracy/tracy-profiler ]]; then
cd profiler/
if [ ! -d build ]; then
mkdir build
fi
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$TRACY_INSTALL_PATH" -DLEGACY=ON
make -j 10
cp tracy-profiler $SCRIPT_DIR/thirdparty/tracy
fi
cd $SCRIPT_DIR