Dev Log #5: Windows, Linux, macOS — One Codebase
Building a cross-platform C++ application in 2026 is still harder than it should be. This week we merged the Windows and Linux development branches into a single codebase — and got macOS building from the same source.
The Build System
CMake with presets. One CMakePresets.json handles:
- Linux: GCC/Clang with system Qt6, AppImage or .deb packaging
- Windows: MSVC 2022 with vcpkg dependencies and NSIS installer
- macOS: Homebrew Qt6, DMG bundling
The build.sh (Linux/macOS) and build.bat (Windows) scripts accept the same CLI arguments — --release, --debug, --clean — so CI and developers use the same workflow.
Static OpenSSL
TLS is non-negotiable for a tool that manages backup infrastructure. Onesimus statically links OpenSSL 3.6, compiled from source as a git submodule. This means:
- No runtime dependency on the system’s OpenSSL version
- Consistent behavior across platforms — same library, same code paths
- No surprises when someone’s distro ships OpenSSL 1.1 but Bareos expects 3.x
The CMake configuration detects whether to use static or dynamic linking automatically based on the platform.
Qt 6.8 Minimum
We made a conscious decision: Qt 6.8 or newer required. This lets us use modern C++17 features, the latest Qt networking improvements, and the new stylesheet engine — without maintaining compatibility hacks for older Qt versions.
For Linux users, this means Ubuntu 24.04+, Fedora 40+, or building Qt from source. The AppImage bundles everything, so end users don’t need to worry about it.
First Community Contribution
The cross-platform work attracted our first external contributor: build improvements from the Bareos team themselves. Nothing validates your project like the upstream community getting involved.