QT_HARMONYOS_PACKAGE_SOURCE_DIR
自定义 HarmonyOS 包模板的路径。
该属性自 Qt 6.12 起引入。
注意:该 属性目前处于技术预览阶段,未来版本中可能会发生变化。
注意: 仅当目标平台为 HarmonyOS 时,才使用此 属性。
指定自定义 HarmonyOS 包模板的路径。该模板是 HarmonyOS 项目骨架,其中包含清单文件(app.json5 、module.json5 )、构建配置文件以及应用程序资源。
如果未设置此属性,将使用 Qt 安装包中随附的默认模板;若设置了该属性,则改用指定的目录。这允许您自定义生成的 HAP 的清单、资源或签名配置。
set_target_properties(myapp PROPERTIES
QT_HARMONYOS_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/harmonyos"
)© 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.