支持的 CMake 版本
cmake_minimum_required()
指定成功配置项目所需的最小 CMake 版本。它还会更新项目的CMake 策略设置,这些设置控制 CMake 向后兼容性行为的各个方面。
Qt 项目需要在cmake_minimum_required
命令中设置3.16
或更新的版本,以确保一套有效的策略行为。
用于配置项目的 CMake 实际版本也取决于目标平台。对于大多数目标平台,它是3.22
。
© 2025 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.