Build From Source#

Building XRTailor from source is a non-trivial task. We recommend using our binary distribution, which can be downloaded from release page.

Download Dependencies#

The following third party libraries are required:

alembic: for data exchange
cnpy: for loading .npz files
cxxopts: for command line option parsing
eigen: for linear algebrea
glad: OpenGL interface
glfw: for OpenGL context, mouse/keyboard event, etc.
glm: for 3D mathematics
imath: a math library, which is a dependency for alembic
imgui: for graphical user interface
jsoncpp: for json formating
spdlog: for logging
tinygltf: for gltf loading
vcglib: for triangle meshes manipulation
zlib: for data compression

Firstly, clone the repo:

git clone https://github.com/openxrlab/xrtailor.git

cd xrtailor

Third-party libraries are managed as Git submodules. To download all dependencies with appropriate versions, run:

git submodule update --init --recursive

This will automatically fetch and initialize all required submodules.

Windows#

System Requirements#

We built our system using the configuration below:

Operation System: Windows 10
Visual Studio version: Visual Studio 2019
Windows SDK version: 10.0.19041.0
Nvidia driver version: 528.49
CUDA version: 11.3
cmake version: 3.31.1

Install Dependencies#

First, make sure that you have cmake installed. Then, change the working directory to ${PROJECT_ROOT}. Install 3rd party libraries utilizing the following script:

./scripts/build_dependencies.bat

This will automatically compile and install 3rd party libraries used by XRTailor. The dependencies will be installed under ${PROJECT_ROOT}\install\.

Build#

Once you have all dependencies successfully installed, change the current working directory to project root and build the project:

cmake -S . -B build -G "Visual Studio 16 2019"
cmake --build build --config Release

If everything is OK, you should see XRTailor.exe on ${PROJECT_ROOT}\build\bin\Release.

Linux#

System Requirements#

We built our system using the configuration below:

Operation System: Ubuntu 20.04
gcc version: 8.5
Nvidia driver version: 528.49
CUDA version: 11.7
cmake version: 3.26.0-rc2

(Optional)Install Ninja#

We employ Ninja as the build tools. To install Ninja on Ubuntu:

sudo apt update
sudo apt install ninja-build

(Optional)Update cmake#

The CMakeLists.txt has a minimum cmake version requirement(>=3.16). You need to upgrade cmake first if your cmake version is out of date. Here are some instructions:

# download cmake
wget https://cmake.org/files/v3.26/cmake-3.26.0-rc2.tar.gz

# unpack
tar -xvzf cmake-3.26.0-rc2.tar.gz

# configure
chmod 777 ./configure
./configure

# make
make

# install
make install

# switch cmake version by soft link
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1

If everything goes well, you should see the following information using cmake --version:

# cmake version 3.26.0-rc2
# CMake suite maintained and supported by Kitware (kitware.com/cmake).

(Optional) If the following error occurs:

CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
Segmentation fault

Solve the issue using:

hash -r

Install Dependencies#

Change the working directory to ${PROJECT_ROOT}. Then, install 3rd party libraries utilizing the following script:

sudo bash ./scripts/build_dependencies.sh

This will automatically compile and install 3rd party libraries used by XRTailor. The dependencies will be installed under ${PROJECT_ROOT}/install/.

Build#

cmake -S . -B build -G "Ninja"
cmake --build build --config Release

You should see XRTailor on ${PROJECT_ROOT}/build/bin.