Skip to content

How to Build SSIGLib

ricardo kloss edited this page Jan 12, 2016 · 2 revisions

This page contains instructions on how to build SSIGLibwith CMake and your native build system.

Operating system support

  • Windows 7/8/8.1 64 bits
  • Linux 64 bits (Ubuntu and CentOs tested)
  • Mac OSX

Requirements

The following code libraries are required for the compilation and usage of the SSIGLib. Instructions for downloading and setup requirements, according to you operating system, can be found in follows pages: windows, linux and mac.

  • CMake 2.8.11 or higher;

  • A compiler with c++11 support:

    • Windows: MSVC11 (VS 2012), MSVC12 (VS 2013), MSVC14 (VS 2015);
    • Linux GCC 4.7 or higher, Clang 3.4 or higher;
    • Mac Clang 3.4 or higher;
  • OpenCV libraries 2.4 or higher;

Building on Windows

This section explains how to build SSF on Windows. The basic procedure and requirements are similar for all supported windows versions, so you can use this as a general guideline.

Make sure that the windows dependencies are already installed. Instructions for how to download and setup de windows dependencies, please visit this page.

  1. Clone the repository from you fork (View this page for more details).
  2. Run CMake-GUI.
  3. In the Where is the source code field, specify the directory where you checked out the source code.
  4. In the Where to build the binaries field, specify a directory you will want your project files to be generated. To separate source code files from build files, create a separate build directory. For example, you can have something like this:
    • D:\work: your work root folder;
    • D:\work\ssiglib: the source code directory, cloned from https://github.com/ssig/ssiglib.git;
    • D:\work\ssiglib: the build and binaries directory;
  5. Hit Configure: The options table will look similar to the following figure:

1. Enable and disable desired options. For a guide on options go to the bottom of this page. 1. **Important!** hit **configure** again, **even if you didn't change anything**. You may have to repeat this process multiple times if you changed options and new options appear. 1. Once you are done configuring all build options, hit **Generate**. If the process ends without errors, you will have Visual Studio solution files under your build directory. 1. You should now be able to open the generated Visual Studio solution and build everything.

Building on Mac / Linux

This section explains how to build SSIGLIB on Linux or MAC. The basic procedure and requirements are similar for all supported operating systems based on UNIX (Linux and MAC), so you can use this as a general guideline.

Make sure that the linux dependencies are already installed. Instructions for how to download and setup the linux dependencies, please visit this page.

  1. Create a new directory for work: mkdir work
  2. Change to work directory: cd work
  3. Download the work source code:
  4. Clone the repository from you fork (View this page for more details).
  5. Create a build directory: mkdir build
  6. Change to build directory: cd build
  7. Run Cmake using one of the following commands:
    • cmake -i ../source - interactive shell version of cmake
    • ccmake ../source- a curses based version of cmake
    • cmake-gui - a gui version similar to the windows one
  8. Follow the same steps as the one in windows to generate a makefile
  9. Run make
  10. If the build succeeds, get in the build/bin directory and you should find your libraries and compiled demo applications.

CMake options

This section is a quick guide to some build options offered in cmake.

  • BUILD_SHARED_LIBS: Build SSIGLib as a shared library.
  • BUILD_DOCS: Build SSIGLib documentation (Please check this page for more details).
  • BUILD_TESTS: Build SSIGLib unit tests.

References: