Giada source code is hosted and mantained on GitHub. It requires a C++20-compatible compiler, Git and CMake already installed. This document is about setting up Giada from the command line, but you can also configure and build it directly in your IDE.
First of all clone the remote repository on your machine:
git clone git@github.com:monocasual/giada.git
a new folder giada/ will be created. Go inside and initialize the submodules (i.e. the dependencies):
git submodule update --init --recursive
Invoke CMake from inside the giada/ folder as follows:
cmake -B <build-directory> -S .
For example:
cmake -B build/ -S .
CMake will generate the proper project according to your environment: Makefile on Linux, Visual Studio solution on Windows, XCode project on macOS. When the script is done without errors, open the generated project with your IDE or run CMake from the command line to compile Giada. Command line example:
cmake --build build/
Some dependencies are included as git submodules. However, Giada requires other external libraries to be installed on your system. Namely:
Libsndfile — 1.2.0 or greater;
Libsamplerate — 0.2.2 or greater;
RtMidi — 5.0.0 or greater;
JSON for Modern C++ — 3.11 or greater;
fmt — 10.0 or greater;
(optional, used for tests) Catch2 — 2.0 or greater.
You can install those dependencies manually and invoke CMake as seen above. Another, easier way is to use vcpkg package manager in manifest mode. This way all the dependencies will be automatically downloaded before building the app. You need to install vcpkg first and then run CMake as follows:
cmake -B [build-directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path-to-vcpkg]\scripts\buildsystems\vcpkg.cmake
where [path-to-vcpkg] is the location where vcpkg is installed in your system.
You can pass several parameters to CMake during the configuration stage as -D<parameter>=<value>. For example:
cmake -B build/ -S . -DPARAMETER1=VALUE1 -DPARAMETER2=VALUE2
This is the list of all CMake parameters currently supported by Giada:
Parameter | Description | Values |
---|---|---|
CMAKE_BUILD_TYPE | Defines the build type. | Debug, Release |
WITH_VST2 | Enables support for VST2 plug-ins. Requires the now deprecated VST2.x SDK by Steinberg. Disabled by default. | ON, OFF |
WITH_VST3 | Enables support for VST3 plug-ins. Disabled by default. | ON, OFF |
WITH_TESTS | Includes the test suite. Requires the Catch2 library installed. Disabled by default. | ON, OFF |
WITH_ALSA | (Linux only) Enables ALSA support. Enabled by default. | ON, OFF |
WITH_PULSE | (Linux only) Enables PulseAudio support. Enabled by default. | ON, OFF |
WITH_JACK | (Linux only) Enables JACK support. Enabled by default. | ON, OFF |
All unit tests in Giada are based on Catch2 automated test framework, which supports several command-line options. Please take a look at the official documentation to understand the gritty details. Giada must be configured with -DWITH_TESTS=ON first, while tests are run as following:
./giada --run-tests [optional catch parameters]