构建系统

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

qmake 会在安装 Qt 时安装和配置。要使用其他受支持的构建系统,你需要对其进行设置。

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

Autotools

使用 Autotools,你可以通过简单的指令创建一个便携、完整、自足的 GNU 编译系统。

CMake

CMake 可替代 qmake 自动生成构建系统。

CMake Qt vendor presets

CMake Qt 供应商预置摘要。

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.