Use the main CMakeLists.txt to build the application. See below for available build options.
Requirements:
- C/C++ compiler with the C++17 standard or later
- CMake 3.12 or higher
- (Linux only) ALSA development libraries
- Qt v6.0.0 or higher
- x86_64 system, supported OSes: Linux, MacOS, Windows
Dependencies satisfied by CMake:
Miniaudio source is included in this repo, also libtrackerboy and RtMidi are acquired via CPM.cmake, so there is no need to install these libraries.
For detailed instructions for your OS, follow one of these build guides:
It is assumed you already have the essentials installed (C++ compiler, git), so the installation of these will not be covered by these guides.
You can also install Qt via aqtinstall
Arch:
sudo pacman -Sy --needed alsa-lib cmake qt6-base
Ubuntu:
sudo apt update
sudo apt install libasound2-dev cmake qtbase6-dev
For other distros the package manager and package names may differ, but the process is the same. Install ALSA development libraries, CMake and Qt5 base (Trackerboy only uses QtWidgets, QtGui and QtCore).
git clone https://github.com/stoneface86/trackerboy
cd trackerboy
For a release build (users):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_UNITY=ON
For a debug build (developers):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build --target all
If successful you can run Trackerboy via:
./build/src/trackerboy
This guide assumes you have brew installed.
brew install cmake qt6
Same as the linux instructions
For a release build (users):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_UNITY=ON
For a debug build (developers):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
Same as the linux instructions
Use aqtinstall, the official installer asks for a user account. You will need pip installed.
pip install -U pip
pip install aqtinstall
Now get your desired version of Qt using aqt
, install this to a directory of
your choice which I will refer to as OUT
. VERSION
is the Qt version to
install, and ARCH
is the target architecture (32-bit or 64-bit + msvc or
mingw). If you are unsure which one to pick, then run
aqt list-qt windows desktop --arch VERSION
for a list of available choices.
Example: for Qt 5.15.2, 64-bit MSVC:
aqt install-qt windows desktop 5.15.2 win64_msvc2019_64 --outputdir OUT
Example: for Qt 5.15.2, 32-bit MSVC:
aqt install-qt windows desktop 5.15.2 win32_msvc2019_64 --outputdir OUT
When configuring CMake, you will need to pass this path to variable Qt5_DIR, substituting OUT, VERSION and ARCH with your selections:
OUT/VERSION/ARCH/lib/cmake/Qt5
Make note of this path, the guide will refer to this path as QTDIR
Same as the linux instructions
When configuring you will need to pass your QTDIR location to cmake as variable Qt5_DIR.
For a release build (users):
cmake -S . -B build -DQt5_DIR=QTDIR -DCMAKE_BUILD_TYPE=Release -DENABLE_UNITY=ON
For a debug build (developers):
cmake -S . -B build -DQt5_DIR=QTDIR -DCMAKE_BUILD_TYPE=Debug
Same as the linux instructions
You can install the built binary if desired. Depending on your CMAKE_INSTALL_PREFIX, you may need administrator priviledges.
cmake --build build --target install
Here is a table of options that can be used when building.
Option | Type | Default | Description |
---|---|---|---|
BUILD_TESTING | BOOL | OFF | Enables unit testing |
ENABLE_UNITY | BOOL | OFF | Enables unity builds (requires cmake 3.16) |
ENABLE_DEPLOYMENT | BOOL | OFF | Enables the deploy target |
Unity builds should only be used if you are just building trackerboy. It is not recommended to have this enabled when developing.
Unity builds will be required for release builds to ensure space-efficient binaries.
Here is a list of compilers that successfully build the project:
- MSVC v19.27
- MSVC v19.26
- GCC 7.5.0
- GCC 10.2.0
If you have issues compiling the project using a compiler not listed here, please submit an issue.