Prerequisites
- Windows
- Linux
- macOS
Build Tools
Choose one of the following:- MinGW-w64 (recommended for cross-platform compatibility)
- Microsoft Visual Studio 2015 Update 3 or newer
Required Dependencies
- CMake 3.13 or later
- Qt 5.x or Qt 6.x
- Git (for cloning the repository)
For detailed Visual Studio setup, refer to the Visual C++ 2015 build instructions in the OpenTrack wiki.
Building OpenTrack
Create Build Directory
Create a separate build directory (out-of-source build):
CMake enforces out-of-source builds. In-source builds are disabled by the build system.
Configure with CMake
Run CMake to configure the build:
If
CMAKE_BUILD_TYPE is not specified, it defaults to RELEASE.Build the Project
Compile OpenTrack using your build system:The
-j$(nproc) flag enables parallel compilation using all available CPU cores.CMake Configuration Options
OpenTrack’s build system provides several configuration options:Compiler Flags
The build system sets optimization flags automatically:Custom Build Options
Build System Architecture
CMake Minimum Version
OpenTrack requires CMake 3.13 or later:Module Organization
The build system uses custom CMake functions defined incmake/opentrack-boilerplate.cmake:
otr_module()- Defines a module (plugin, library, or executable)otr_glob_sources()- Automatically finds source filesotr_install_lib()- Handles library installation
Available Translations
OpenTrack supports multiple languages:Troubleshooting Build Issues
Qt Not Found
Qt Not Found
Problem: CMake cannot find Qt libraries.Solution:Set the Or use
CMAKE_PREFIX_PATH to your Qt installation:Qt5_DIR:OpenCV Not Found
OpenCV Not Found
Problem: OpenCV headers or libraries are missing.Solution:Install OpenCV development packages or specify the path:
Compiler Version Too Old
Compiler Version Too Old
Problem: Compiler doesn’t support C++17 features.Solution:OpenTrack requires a modern C++ compiler:
- GCC 7.0+
- Clang 5.0+
- MSVC 2015 Update 3+
Link Errors on Linux
Link Errors on Linux
Problem: Undefined references during linking.Solution:Ensure all development packages are installed:On Unix systems, the math library is automatically linked:
In-Source Build Error
In-Source Build Error
Problem:
CMAKE_DISABLE_IN_SOURCE_BUILD error.Solution:OpenTrack enforces out-of-source builds. Delete CMakeCache.txt and CMakeFiles/ from the source directory, then build in a separate directory:Building Individual Modules
You can build specific targets:Next Steps
After successfully building OpenTrack:Plugin Development
Learn how to create custom trackers, filters, and protocols
Contributing
Contribute code, translations, or documentation
Portable Mode
Create a portable USB installation
Troubleshooting
Resolve common runtime issues