Qt CMake 策略
Qt CMake 策略旨在维护多个版本之间的向后兼容性。每项新策略首先会就已弃用的功能或行为向您发出警告;随后会显示一条简要描述该变更的警告消息。若要禁用某项策略的警告,请使用qt_policy()命令显式请求该策略的NEW 或非向后兼容行为。
策略
':/qt/qml/' 是 Qml 模块的默认资源前缀 | |
指定 Android 特定路径的目标属性可包含生成器表达式 | |
创建 Qt 库时请考虑 BUILD_SHARED_LIBS 的值 | |
QML 模块中包含 QML 文件的额外目录需要额外的 qmldir 文件 | |
允许 qt_add_qml_module() 依赖关系关键字接受 CMake 目标 | |
将 PRIVATE_CODE 设为 Wayland 协议源代码生成的默认值 | |
在生成的部署脚本中对引号和转义字符进行转义 | |
在不重新评估的情况下转发部署脚本的参数 |
© 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.