Skip to main content

Integrate Candera into Custom Build Environments

Integrate Candera into Custom Build Environments

For building Candera as part of the Player demo application, please refer to Building the Player.

If a custom application should include Candera libraries, this chapter explains the CGI-Studio library build process. To simplify integration of Candera source code into a custom build environment references to Candera compile switches are given below.



Build Cgi-Studio Candera libraries with CMake

Use CMake to create a Visual Studio solution for host or any other build environment (like make files for targets) and build Candera libraries.

  1. Start CMake
  2. Point "Where is the source code" to <cgi-studio-root>/cgi_studio_candera/src
  3. Point "Where to build the binaries" to <cgi-studio-root>/cgi_studio_candera/build. Note that the name of the build directory can be freely chosen but it is required to create it on the same directory level as "src". Avoid blanks in the path
  4. Click "Configure" and select the proper generator for the desired build environment.
    > As an example, for host builds using Visual Studio 2010, select "Visual Studio 10".
    > For target builds, please refer to the given target-specific setup documentation part of CGI Studio releases.
  5. Confirm the dialog with OK. All Candera CMake settings which can be configured will appear in the main window, having red lines for all settings to be confirmed.
  6. Check and modify the Candera CMake properties and click "Configure" again
  7. As long as red lines are visible, those lines must be confirmed by clicking "Configure" again.
  8. If no more red lines are visible, the "Generate" button is enabled. Click "Generate" to create the Visual Studio solution (or the make files for make-based build environments).

Build Candera with the CMake-generated build environment (Visual Studio solution for host, e.g.).

Candera libraries will be available in the separate folders in the given build directory.
To collect all of the libraries in a specific folder, an output path can be specified during CMake configuration:
   - Tick the "Advanced" checkbox in the CMake GUI.
   - After pressing "Configure", the CMake property "CANDERA_ENABLE_LIBRARY_OUTPUT" will become visible. Tick this and press "Configure" again.
   - Specify the library output directory in the "LIBRARY_OUTPUT_PATH" CMake variable.


Integrate Candera Source Code (Compile Switches)

When Candera source code is built using Candera CMake configuration, all relevant compile switches (defines) are already set by CMake. The template CanderaConfig.h.template (refer to <cgi_studio_root>/cgi_studio_candera/cmake/templates) is used by CMake to generate the file CanderaConfig.h in the build directory.

If Candera source code is built using a custom build environment, learn about all configuration defines available for Candera in the Candera API Documentation: