-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetupTheia.sh
68 lines (52 loc) · 1.7 KB
/
setupTheia.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
56
57
58
59
60
61
62
63
64
65
66
67
68
#! /bin/bash
### script to look for root installations, pythonpath etc and set to proper values needed for the project.
## set the path of Theia directory
## This variable is needed in the CMakeLists.txt
export THEIAPATH=$PWD
echo "Setting the THEIAPATH to"$THEIAPATH
### Now prepare the build and install directory
BUILD_DIR="../build/"
if [ -d "${BUILD_DIR}" ]; then
### Take action if $DIR exists ###
echo "Building files in ${BUILD_DIR}..."
else
### Control will jump here if $DIR does NOT exists ###
echo "${BUILD_DIR} directory not found. Making the directory first!"
mkdir -p ${BUILD_DIR}
fi
RUN_DIR="../run/"
if [ -d "${RUN_DIR}" ]; then
### Take action if $DIR exists ###
echo "Building files in ${RUN_DIR}..."
else
### Control will jump here if $DIR does NOT exists ###
echo "${RUN_DIR} directory not found. Making the directory first!"
mkdir -p ${RUN_DIR}
fi
INSTALL_DIR="../install/"
if [ -d "${INSTALL_DIR}" ]; then
### Take action if $DIR exists ###
echo "Installing files in ${INSTALL_DIR}..."
else
### Control will jump here if $DIR does NOT exists ###
echo "${INSTALL_DIR} directory not found. Making the directory first!"
mkdir -p ${INSTALL_DIR}
fi
BIN_DIR="../install/bin/"
if [ -d "${BIN_DIR}" ]; then
### Take action if $DIR exists ###
echo "Installing files in ${BIN_DIR}..."
else
### Control will jump here if $DIR does NOT exists ###
echo "${BIN_DIR} directory not found. Making the directory first!"
mkdir -p ${BIN_DIR}
fi
export INSTALL_PATH=$PWD/../install/bin
### cmake and install
cd ../build
cmake ../Theia
cmake --build . --target install
### insert the path of libraries
export PATH=$PATH:${INSTALL_PATH}
### go back to run directory
#cd ../run