构建系统

创建项目时,您可以选择用于构建项目的构建系统:CMake、qmake、Meson 或 Qbs。

安装 Qt 时,qmake 会自动安装并配置。若要使用其他受支持的构建系统,则需要自行进行设置。

构建配置包含将源代码编译为二进制文件所需的一切内容。构建配置使用其对应套件中定义的工具和设置。

Autotools

借助 Autotools,您可以根据简单的指令创建一个可移植、完整且自包含的 GNU 构建系统。

CMake

CMake 是 qmake 的替代方案,用于自动生成构建系统。

CMake Qt Creator vendor presets

CMakeQt Creator 供应商预设的摘要。

CMake presets

支持的 CMake 预设示例。

Conan build configuration

使用 Conan 包管理器构建应用程序的设置。

Conan package manager

实验性的 Conan 插件集成了 Conan 包管理器。

IncrediBuild

IncrediBuild 可缩短构建 C++ 代码所需的时间。

IncrediBuild build configuration

IncrediBuild 的构建和清理步骤。

Meson

使用 Meson 构建原生桌面应用程序。

Meson build configuration

使用 Meson 构建应用程序的设置。

Nimble

Nimble 包管理器使用 Nim 编译器为桌面平台生成 Nim 应用程序可执行文件。

Qbs

Qbs 是一款多功能构建工具,它从高级项目描述中生成构建图(类似于 qmake 或 CMake 的做法),并执行低级构建图中的命令(类似于 make 的做法)。

Qbs build configuration

使用 Qbs 构建应用程序的设置。

另请参阅 《如何:构建和运行》、《构建和运行项目》以及《管理套件》。

Copyright © The Qt Company Ltd. and other contributors. 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.