Building From Source
Prerequisites #
| Dependency | Version | Notes |
|---|---|---|
| CMake | 3.24+ | Build system |
| C++ compiler | GCC 13+ or Clang 17+ | C++23 support required for LibreMiddleware; LibreCelik still targets C++20 (bump to C++23 is on the 4.x roadmap) |
| Qt 6.6+ | Widgets, PrintSupport, LinguistTools | LibreCelik only |
| PC/SC | libpcsclite-dev (Linux) | Built-in on macOS |
| OpenSSL 3 | — | Bundled in LibreMiddleware thirdparty/ |
| UUID | uuid-dev (Linux) | UUID generation |
Building LibreMiddleware #
LibreMiddleware is a standalone C++23 library with no Qt dependency.
git clone https://github.com/LibreSCRS/LibreMiddleware.git
cd LibreMiddleware
cmake -B build
cmake --build build
Run the test suite:
cd build && ctest --output-on-failure
Building LibreCelik #
LibreCelik is the Qt6 GUI application. It fetches LibreMiddleware automatically via CMake FetchContent.
git clone https://github.com/LibreSCRS/LibreCelik.git
cd LibreCelik
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
Local Development #
When working on both projects simultaneously, point LibreCelik to your local LibreMiddleware checkout instead of fetching from GitHub:
cmake -B build -DFETCHCONTENT_SOURCE_DIR_LIBREMIDDLEWARE=/path/to/LibreMiddleware
cmake --build build
This way changes to LibreMiddleware are picked up immediately without committing or pushing.
Running Tests #
Both projects use Google Test (auto-fetched via CMake). Run all tests with:
cd build && ctest --output-on-failure
To run a single test:
cd build && ctest -R <test_name> --output-on-failure
Disable tests entirely with:
cmake -B build -DBUILD_TESTING=OFF
LibreCelik test runner gotcha #
ctest may report “No tests found” due to a gtest_discover_tests timing issue. If this happens, run the test binaries directly:
cd build
./test/LibreCelikTests
./test/CardWidgetPluginRegistryTests
./test/AsyncCardReaderTests