Skip to content

Installation

Naravich Chutisilp edited this page Aug 14, 2023 · 5 revisions

Building

Dependencies

(Optional) There are some dependencies that TTool needs. If using Ubuntu, these commands may be useful if the package has not been installed in the computer.

apt-get -y install libopencv-dev
apt-get -y install libassimp-dev
apt-get -y install libgoogle-glog-dev
apt-get -y install freeglut3-dev libglew-dev libglfw3 libglfw3-dev

(Mandatory) TTool has a classifier for tool head which requires libtorch. Our CMake will automatically install this for you. This requires git lfs to pull the package and for CMake to extract the package in the deps folder. Hence, please install git lfs before building TTool. The zip file of the libtorch should be located at assets/libtorch-cxx11-abi-shared-with-deps-2.0.1+cpu.zip. If you don't have this file, please pull it from the main

git lfs pull

IMPORTANT, if you manually install libtorch following the instruction from the website, you will not be able to use TTool with the augmented carpentry, or generally, any other project that declare using namespace std. This is because the libtorch will conflict with the std namespace. We did patch this on the package following this forum. Hence, we recommend using our CMake to install libtorch for you.

Build

Once dependencies are installed, you can build the project with the following commands.

./config.sh
./build.sh

# or
cmake -S . -B build
cmake --build build

# or building with TTool Standalone
cmake -S . -B build -DOPT_BUILD_TTOOL_EXE=ON
cmake --build build

Install/uninstall

Install is needed when used TTool as a library for other projects. This will installation allows CMake's find_package to find TTool

sudo cmake --install build
sudo cmake --build build --target uninstall