-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_thirdparty.sh
executable file
·32 lines (28 loc) · 1.07 KB
/
build_thirdparty.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
# update submodules
echo "----------------------------------------------------"
echo "update submodules remotely, it may take some time..."
echo "----------------------------------------------------"
git submodule update --init --recursive
if [ $? -ne 0 ]; then
echo "--------------------------------------------"
echo "error occurs when updating submodules, exit!"
echo "--------------------------------------------"
exit
fi
# shellcheck disable=SC2046
CTRAJ_ROOT_PATH=$(cd $(dirname $0) || exit; pwd)
echo "the root path of 'ctraj': ${CTRAJ_ROOT_PATH}"
# build tiny-viewer
echo "----------------------------------"
echo "build thirdparty: 'tiny-viewer'..."
echo "----------------------------------"
mkdir ${CTRAJ_ROOT_PATH}/thirdparty/tiny-viewer-build
# shellcheck disable=SC2164
cd "${CTRAJ_ROOT_PATH}"/thirdparty/tiny-viewer-build
cmake ../tiny-viewer
echo current path: $PWD
echo "-----------------------------"
echo "start making 'tiny-viewer'..."
echo "-----------------------------"
make -j8
cmake --install . --prefix ${CTRAJ_ROOT_PATH}/thirdparty/tiny-viewer-install