Getting started using CMake
This guide assumes that your chai3d installation is located in your home folder (e.g. ~/chai3d)
Prerequisites
- Make sure that CMake is installed for your platform.
- On Windows, make sure that VisualStudio or another compiler is installed.
- On Linux, make sure that the following development libraries are installed on your system:
- GLUT
- libusb-1.0
- libasound2
- On Mac OS X, make sure that XCode and the XCode Command Line Tools are installed.
Installation
- (optional) On Linux, install the drivers and device management permissions for the following hardware:
- Force Dimension (see
~/chai3d/external/DHD/doc/linux/readme.txt) - Sixense (see
~/chai3d/external/sixense/doc/linux/readme.txt) - 3DSystems (see
~/chai3d/extras/hdPhantom/doc/linux/readme.txt)
Compilation
- open a terminal (or a DOS prompt on Windows)
- cd to
~/chai3d - create and cd to an out-of-source build folder (e.g.
~/chai3d/build):mkdir build
cd build - configure project file:
cmake -DCMAKE_BUILD_TYPE=Release .. - (alternative) to configure with debug information, run:
cmake -DCMAKE_BUILD_TYPE=Debug .. - build project as configured:
cmake --build .
Trying the examples
- from the terminal:
- cd to
~/chai3d/bin - run examples (e.g.
./01-mydevice) - from the file manager:
- navigate to
~/chai3d/bin - double-click on example executable (e.g.
01-mydeviceor01-mydevice.exe)
Reading the documentation
- check out the documentation page

