Configure and compile RINGMesh source code

RINGMesh Configuration options

RINGMesh comes with a CMake configuration file. Several options can be selected in order to build the project that fits your needs:

Linux configuration and compilation

Toolbox

Mandatory tools

Other dependencies

To compile the graphical libraries of RINGMesh (more precisely of Geogram), you need to install the development package of:

The command line under Debian-based OS to install all the necessary packages to compile RINGMesh is:

    sudo apt-get install build-essential libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev freeglut3-dev libxi-dev

Optional tools

There is no other dependency (everything you need is shipped with RINGMesh).

Configuring RINGMesh

Execute cmake command in a RINGMesh/build directory.

mkdir build
cd build

To configure using default options:

cmake ..

To define the options, use the cmake interface

cmake-gui .. or ccmake ..

Compiling RINGMesh

To compile RINGMesh, go to RINGMesh root directory and:

cd build/Release
make

To build in debug, go to build/Debug instead.

Note: RINGMesh uses C++ 11 features. You need gcc/g++ version higher or equal to 4.8 to compile it.

Troubleshooting

If you get this error during geogram gfx compilation (occured for Ubuntu 17.04):

No rule to make target '/usr/lib/x86_64-linux-gnu/libGL.so'

you can try under root:

rm /usr/lib/x86_64-linux-gnu/libGL.so
ln -s /usr/lib/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so

Generating the documentation

If Doxygen is installed on your computer, a target doc-devkit is built during RINGMesh configuration. You can generate the documentation using the following command in the RINGMesh_root/build/config directory:

make doc-devkit

Open the RINGMesh documentation with your favorite web browser at: RINGMesh_root/build/config/ringmesh/devkit/html/index.html

Windows configure and compile

Toolbox

Mandatory tools

Optional tools

There is no other dependency (everything you need is shipped with RINGMesh).

Configuring RINGMesh

Compiling RINGMesh

RINGMesh need several third parties that are automatically compiled and installed by compiling the project SUPERBUILD.sln.

All the RINGMesh third parties have now been compiled, installed and the RINGMesh.sln project have been created in the repository: RINGMesh_root/build/ringmesh.

The available compilation modes are:

Note: Visual Studio has on pile per configuration mode. You must link consistently with the expected configuration mode.

Compiling the documentation

If Doxygen (version >= 1.8.2) is installed on your computer, a target doc-devkit is built during RINGMesh configuration. You can generate the documentation by: Opening the solution which is in RINGMesh_root/build/ringmesh/RINGMesh.sln in Visual Studio Building the doc-devkit

Open the RINGMesh documentation with your favorite web browser at: RINGMesh_root\build\ringmesh\devkit\html\index.html

Mac OS configure and compile

Toolbox

Mandatory tools

Optional tools

There is no other dependency (everything you need is shipped with RINGMesh).

Configuring RINGMesh

Using clang (without Xcode)

As in Linux.

Using Xcode IDE

As in Windows but with the Xcode generator (use "-G Xcode" if you use cmake in command lines).

Compiling RINGMesh

You need to install the Mac OS "Command Line Developer Tools".

Note: you need gcc/g++ version higher or equal to 4.2 to compile RINGMesh. In Mac OS, clang is used.

Using clang (without Xcode)

As in Linux except for the packages.

Using Xcode IDE

You need to install Xcode IDE. Open the build/ringmesh/RINGMesh.xcodeproj with Xcode IDE, and then compile (as in Windows with VisualStudio). Or use these command lines:

cd build/ringmesh
xcodebuild -project RINGMesh.xcodeproj -alltargets -configuration Release

To build in Debug, replace "Release" by "Debug" after "-configuration".