- Qt 6.8
- Build with CMake
- Qt 6.8.3 Reference Documentation

Getting started with CMake

# Build with CMake

`CMake` is a tool to simplify the build process for development projects across different platforms. `CMake` automatically generates build systems, such as Makefiles and Ninja files.

`CMake` is a third-party tool with its own documentation. This manual focuses on how to use `CMake` to build Qt applications and libraries.

## Table of Contents

- Getting started with CMake
  - Building a C++ console application
  - Building a C++ GUI application
  - Structuring projects
  - Building libraries
  - Using libraries
  - Adding resources
  - Adding translations
  - Further reading
- Building a QML application
- Building a reusable QML module
- Building projects on the command line
  - CMake generators
  - qt-cmake
  - Cross-compiling
  - Specifying a custom toolchain file
- Deployment
  - Deploying a Qt Widgets application
  - Deploying a Qt Quick application
- Supported CMake versions
- Imported targets
- Qt CMake policies
- Qt 5 and Qt 6 compatibility
  - Versionless targets
  - Versionless commands
  - Supporting older Qt 5 versions
  - Recommended practices
- CMake Command Reference
  - Qt6::Core
  - Qt6::DBus
  - Qt6::Grpc
  - Qt6::InterfaceFramework
  - Qt6::LinguistTools
  - Qt6::Multimedia
  - Qt6::Protobuf
  - Qt6::Qml
  - Qt6::RemoteObjects
  - Qt6::Scxml
  - Qt6::ShaderTools
  - Qt6::WaylandClient
  - Qt6::WaylandCompositor
  - Qt6::WebEngineCore
  - Qt6::Widgets
- CMake Variable Reference
  - Qt build variables
  - Module variables
  - Installation variables
  - Project variables
- CMake Property Reference
  - Qt6::Core
  - Qt6::DBus
  - Qt6::LinguistTools
  - Qt6::Qml
  - Standard CMake properties

Getting started with CMake