Skip to content

Building TiGL from Source

Martin Siggel edited this page May 26, 2015 · 18 revisions

Windows

We recommend building TiGL with Visual C++ 2010 as a 32bit variant. The free Visual C++ Express also works. Other compilers should do as well, but we don't porivide any support for them.

Getting the prerequisites

Build steps:

  1. Extract the TiGL Code to a directory of your choice. In this tutorial, the directory will be d:\src\tigl
  2. Open the command shell (Press Windows key and type in cmd.exe)
  3. Change into the TiGL source directory, e.g.
cd d:\src\tigl
  1. Create a build directory and change into it
mkdir build && cd build
  1. Create the building environment by running cmake
cmake -G "Visual Studio 10 2010" -DTIXI_PATH=d:\src\tixi-binaries -DCASROOT=d:\src\oce-binaries -DCMAKE_INSTALL_PREFIX=install ..

You might change the paths where you extracted TiXI and OCE.

  1. If everything is fine, close the command shell. Open the Windows Explorer and go to the d:\src\tigl\build directory. Open the TIGL.sln file with Visual C++.

  2. In Visual C++, perform the Release build of the ALL_BUILD project. The Debug build would require a special OCE debug version.

  3. Finally install TiGL by building the INSTALL project. You can find the installed TiGL in d:\src\tigl\build\install

Ubuntu / Mint / Debian Linux

Getting the prerequisites

  1. Please add our package repository matching your distribution via
echo 'deb http://download.opensuse.org/repositories/home:martinsiggel/xUbuntu_13.04/ /' >> /etc/apt/sources.list.d/tigl.list 
sudo apt-get update

Replace the string xUbuntu_13.04 by your distribution id. This allows installing opencascade and tixi from out repository.

  1. Install the dependencies via
sudo apt-get install cmake libtixi-dev qt4-dev-tools liboce-dev

Build steps:

  1. Download and extract the tigl source. For this tutorial, TiGL is extracted to $HOME/src/tigl
  2. Open a command shell, enter into the TiGL directory and create a build directory by:
cd $HOME/src/tigl
mkdir build
  1. Create the makefiles by running cmake:
cmake -DCMAKE_INSTALL_PREFIX=install ..

You might change the installation directory.

  1. If no errors occured, build TiGL:
make
  1. (Optional) install TiGL:
(sudo) make install

sudo is only required, if you want to install it into a system path like /usr/local

Mac OS X

Getting the prerequisites

To build TiGL, follow the same build steps for linux. In the cmake configuration, you have to add the OCE installation directory and the TiXI installataion directory:

cmake -DTIXI_PATH=$HOME/src/tixi/build/install -DCASROOT=$HOME/src/oce/build/install -DCMAKE_INSTALL_PREFIX=install ..

Python interface

If python is installed, the python interface will be automatically built at the compile phase. The resulting file tiglwrapper.py is located under buildDir/lib/. When using the TiGL installer, the python wrapper can be found in installDir/share/tigl/python/. To install the TiGL python wrapper, please copy this file in your python/Lib/site-packages/ folder.