Installation

Quick links

Dependencies

Linux

PoLAR requires some dependencies to be built. On Linux environments, all of them are available as official packages.
The required packages are listed below:

    • Qt5 packages:
qt5-default qttools5-dev-tools libqt5opengl5-dev qtmultimedia5-dev libqt5multimedia5-plugins qtdeclarative5-dev libqt5svg5-dev
    • OpenSceneGraph packages:
openscenegraph libopenscenegraph-dev
    • For the multimedia functionalities, we recommend using gstreamer:
libgstreamer0.10-0 libgstreamer0.10-dev streamer-tools
    • If you want to generate the Doxygen documentation, you will also need these packages:
doxygen graphviz

These packages can be installed on Linux platforms through the package managers.
The minimum required Qt version is version 5.4. It is available in the default apt-get packages in Ubuntu 15.04 and higher. On older versions, you will have to use the source version.

The minimum required OpenSceneGraph version is version 3.2 which is available as packages in Ubuntu 14.04 and higher.
Once the packages are installed, you should not have to change anything in the PoLAR CMakeLists.txt. All the packages should be found automatically. If you use source versions, you will have to set the paths to your installation (see section 2.1.3).

Windows

On Windows environment, you will have to install all needed libraries and compilation tools first. We recommend using Visual Studio. Visual Studio 2013 has been successfully tested. All versions above VS 2010 should work. Only 32 bit compilation was successfully tested.

  • Qt

We recommend using the online Qt installer3. The minimal required version is Qt 5.4. Precompiled projects for Visual Studio is provided. Be sure to choose the one corresponding to your Visual Studio version.

  • OpenSceneGraph

Due to the lack of recent binaries, we recommend compiling from sources4.
You may need to add some third party libraries (e.g. for loading some particular formats). Please refer to the OpenSceneGraph documentation to do so.
If you want to compile PoLAR as RELEASE, be sure to compile OpenSceneGraph as RELEASE too. OpenSceneGraph does not provide Visual Studio projects, but it is easy to create one. Using CMake5, you can create a Visual Studio project from a CMake project. Then you will need to compile the VS project. It should compile without any difficulties.

Compiling PoLAR

When Qt and OpenSceneGraph are compiled, you will need to add references to their installation folders in the PoLAR CMakeLists.txt. We recommend using CMake to generate a Visual Studio project from this CMakeLists.txt. Please refer to section 2.1.3 for the useful CMake options. In Visual Studio, be sure to check if the right mode (RELEASE or DEBUG) is selected. Then, you just have to run the compilation.

MacOS

If not already done, install X-Code, which is mandatory for most of development work in Mac OS. It is available through the App Store. Once installed you will need to run two extra command lines in a Terminal:

  • sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
  • sudo xcodebuild -license and agree with the licence

PoLAR requires some dependencies to be built. On Mac OS environments, all of them are available as packages. We recommend to use Homebrew7 that has been successfully tested with PoLAR . To install Homebrew simply run:

   /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

The required packages are listed below:

  • All the basic tools to download the project and to compile it:
  •  brew install git make 
  • OpenSceneGraph packages version 3.2 exactly:
  •  brew install -vd https://github.com/Homebrew/homebrew/commit/bd342884aacb198003be479ba08feacdcc82d250#Library/Formula/open-scene-graph.rb

    It will also install QT 5.5 by default. You will need to add the library path (for instance, in /.profile):

    export DYLD_LIBRARY_PATH=/usr/local/Cellar/open-scene-graph/3.2.0/lib/:$DYLD_LIBRARY_PATH
  • If you want to generate the Doxygen documentation, you will also need these packages:
  • brew install doxygen graphviz

Once the packages are installed, you should not have to change anything in the PoLAR CMakeLists.txt. All the packages should be found automatically. If you use source versions instead, you will have to set the paths to your installation (see section 2.1.4).
This installation protocol has been tested on OS X El Capitan (version 10.11.3).

CMakeFile options

PoLAR uses CMake for the build steps.
The first step is to generate the Makefile from the CMakeLists.txt file. Use the way you prefer

to generate the Makefile. For platform specific details, see the next sections. In the CMakeLists file, some options can be modified:

  • BUILD PoLAR EXAMPLES: set it to ON if you want to compile the examples provided with PoLAR. Thoses examples show the different features of PoLAR.
  • DYNAMIC PoLAR: if ON, PoLAR will be built for dynamic linking. If OFF, PoLAR will be built for static linking.
  • USE OFF PLUGIN: if ON, the plugin for loading OFF 3D models in OpenSceneGraph will be compiled. It will be placed in the same output folder than the PoLAR library.
  • OSG USE FBO: default to ON. Setting it to OFF will deactivate the use of a custom version of osg::CullVisitor, needed since Qt 5.4 because of an incompatibility between Qt and OSG regarding the use of FBOs.
  • DOXYGEN GENERATION: if set to ON, the doxygen documentation will be generated and will be accessible in the /Doc folder.
  • QT CUSTOM DIR, OSG CUSTOM DIR, OSG CUSTOM INCLUDE DIRS: require a path in string format to a Qt or OSG custom installation folder. When set, CMake will use these paths to find Qt and OpenSceneGraph in the case packaged versions are not found (e.g. on Windows).