Next: , Previous: Step-by-step building instructions, Up: Source installation

2.3 Configuring with CMake

Marsyas uses CMake to configure and guide its building process. CMake allows for automatic configuration according to the current platform, as well as user-configurable building options. It allows you to enable and disable specific Marsyas features.

After configuration, CMake creates files that contain instructions for the next step of the building process. This may be:

2.3.1 Running CMake

Note: The following instructions assume that you have done the prerequisite steps described in Step-by-step building instructions:

  1. Obtained Marsyas sources
  2. Installed CMake and other prerequisite software
  3. Created a build directory within the top-level Marsyas directory and navigated your command-line to the build directory

There are several ways that configuration using CMake can be performed. Using CMake GUI

Note: On Linux, you will need to install an extra package for the CMake GUI. On Debian/Ubuntu the package name is cmake-qt-gui.

You can start CMake GUI either graphically via the list of applications installed on your system, or by using the 'cmake-gui' command in the Linux console, OS X Terminal, or Windows Command Prompt.

CMake GUI contains a list of available options: the left column lists option names, and the right column their editable values. By moving the mouse cursor over an option name, its description will pop up. To perform configuration, follow the steps below:

  1. If Marsyas has not been configured before, the list of options will be empty. Click "Configure" to do the initial auto-configuration.
  2. Modify options as desired, and click "Configure" again.
  3. Once you are satisfied with options, click "Generate" to apply them.
  4. You can now exit CMake GUI and proceed with the compilation step of the building process (see Step-by-step building instructions). Entirely on command-line

You can also perform CMake configuration entirely on command-line. Options are controlled by using the 'cmake' command and passing it arguments of the form "-D" + [option name] + "=" + [value]. Values can be paths to directories and files, or simply "ON" and "OFF" (or equivalently, "TRUE" and "FALSE"). Multiple options can be changed using the same command.

For example, assuming that you are in the build directory:


After invoking the cmake command one or multiple times to apply desired options, you can proceed with the compilation step of the building process (see Step-by-step building instructions) More alternatives

There are more alternative ways to use CMake. Please read detailed instructions on the CMake website:

2.3.2 Most prominent options

The following is a list of most important and commonly used options provided either by Marsyas or CMake itself. Input / output
This enables audio input/output. Requires DirectX on Windows and either JACK, ALSA or OSS on Linux. MacOS X audio support is built-in with the basic developer tools.

Note: This option requires C++11 support - in other words, the WITH_CPP11 option must also be enabled (described below).

This enables midi input/output. Requires DirectX on Windows and either ALSA or OSS on Linux. MacOS X audio support is built-in with the basic developer tools.

Note: Audio and MIDI IO support also depend on WITH_JACK, WITH_ALSA, and WITH_OSS options, described below. Code messages and optional portions
Turns on assertions.
Turns on profiling.
Turns on debugging info (large performance penalty).
(advanced option) experimental code for distributed systems. Message logging

These are advanced options.

Build Marsyas tests, so they can be run using make test. Optional software

All of these options require additional software to be installed and properly configured.

Enables compilation in C++11 mode. If disabled, Marsyas will be compiled with limited functionality. Specifically, the audio IO and multi-threading support require this option to be enabled.

This option requires a compiler with adequate C++11 support. Minimum required compiler versions are ensured by CMake, and reported if not satisfied.

mp3 audio decoding with LibMAD
ogg vorbis audio decoding with libvorbis - it requires
Builds the MATLAB engine interface.
Builds SWIG bindings. This option enables the following sub-options: WITH_SWIG_PYTHON, WITH_SWIG_JAVA, WITH_SWIG_LUA, and WITH_SWIG_RUBY.
Use Swig to generate Python bindings
Use Swig to generate Java bindings
Use Swig to generate Lua bindings
Use Swig to generate Ruby bindings

Builds the Qt5 GUI applications. Most Marsyas GUI applications are of this type. Requires Qt 5.0 or higher.
Builds the Qt4 GUI applications. There are only a few unmaintained Marsyas GUI applications of this type, preserved mostly for inspiration. Requires Qt 4.2.3 or higher.
Build plugins for Vamp (see SonicVisualiser Vamp Plugins for more information).
Use GStreamer as an audio source


Enables audio IO using JACK, if available.
Enables audio and MIDI IO using ALSA, if available.
Enables audio and MIDI IO using OSS, if available. Documentation
If enabled, only build documentation, not program sources. This allows to build documentation without even the presence of a compiler or any requirements related to program code.