支持的 CMake 版本
cmake_minimum_required() 指定了成功配置项目所需的最低 CMake 版本。它还会更新项目的CMake 策略设置,这些设置控制着 CMake 向后兼容行为的各个方面。
Qt 项目必须在 `cmake_minimum_required ` 命令中将版本设置为 `3.16 ` 或更高版本,以确保策略行为正常运行。
用于配置项目的实际 CMake 版本还取决于目标平台。对于大多数目标平台,该版本为3.25 。
© 2026 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.