• Qt 6.7
  • Build with CMake
  • Qt 6.7.2 Reference Documentation

Getting started with CMake

Contents

  • Table of Contents

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
  • 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::InterfaceFramework
    • Qt6::LinguistTools
    • Qt6::Protobuf
    • Qt6::Grpc
    • Qt6::Qml
    • Qt6::RemoteObjects
    • Qt6::Scxml
    • Qt6::Widgets
    • Qt6::WebEngineCore
  • CMake Variable Reference
    • Qt build variables
    • Module variables
    • Installation variables
    • Project variables
  • CMake Property Reference
    • Qt6::Core
    • Qt6::DBus
    • Qt6::LinguistTools
    • Qt6::Qml

Getting started with CMake

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.