Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.33 KB

File metadata and controls

52 lines (34 loc) · 1.33 KB

QtBoostCMake

A C++ project template with Qt6, Boost, Google Tests and CMake that downloads and compiles Qt and Boost. The resulting app is an executable that can be run on a system without Qt and Boost.

The main Qt6 configuration is found in the correspondent CMakeLists.txt file. The main Boost configuration is found in the correspondent CMakeLists.txt file. The main Google Tests configuration is found in the correspondent CMakeLists.txt file.

Note that statically compiled Qt6 weights more than 5 GB. The good thing is that user does not need whole compiled Qt6 with this configuration.

Prerequisites

  • CMake
  • Ninja
  • Git

On Linux: libgl1-mesa-dev libglu1-mesa-dev and all dependencies are required.

Note that most of the libraries that match *xcb* and *xkb* may be required on Linux.

How to build and run

Run the following commands from the project directory.

  1. Create CMake cache

This step may take a lot of time because it downloads and compiles Qt.

cmake -S . -B cmake-build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
  1. Build executable target
cmake --build cmake-build --target QtCMake
  1. Run executable target
  • On Windows:
.\cmake-build\bin\QtCMake.exe
  • On *nix:
./cmake-build/bin/QtCMake