Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qt-for-harmonyos-cmake-api.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-for-harmonyos-cmake-api.html
6
\title Qt for HarmonyOS CMake API
7
\brief Overview of the CMake commands, properties, and variables for HarmonyOS
8
deployment.
9
10
\note The HarmonyOS CMake API is in technology preview and may change in
11
future releases.
12
13
This page lists the CMake commands, target properties, and variables that
14
configure how a Qt application is packaged into a HarmonyOS Ability Package
15
(HAP).
16
17
When you create a Qt executable with
18
\l qt_add_executable() while targeting HarmonyOS, Qt
19
automatically generates a \c {<target>_make_hap} build target that produces the
20
HAP. The commands, properties, and variables below control the contents of that
21
HAP and the metadata written into the HarmonyOS manifest files.
22
23
A HarmonyOS application bundle is described by two kinds of manifest: the
24
application-level \c {app.json5}, which holds metadata that applies to the whole
25
bundle, and the module-level \c {module.json5}, which describes a single HAP
26
module within that bundle. The target properties below mirror this split: the
27
\c QT_HARMONYOS_APP_* properties set application-level metadata, such as the
28
\l{cmake-target-property-QT_HARMONYOS_APP_VENDOR}{vendor}, version, label, and
29
icon, while properties such as
30
\l{cmake-target-property-QT_HARMONYOS_MODULE_DESCRIPTION}{QT_HARMONYOS_MODULE_DESCRIPTION}
31
and
32
\l{cmake-target-property-QT_HARMONYOS_ABILITY_ORIENTATION}{QT_HARMONYOS_ABILITY_ORIENTATION}
33
set module-level metadata. See the Target Properties section below for the full
34
list.
35
36
\section1 Commands
37
38
\list
39
\li \l qt_add_harmonyos_permission() adds a
40
HarmonyOS permission to the application.
41
\endlist
42
43
\section1 Target Properties
44
45
The following target properties affect how the HAP is built:
46
47
\annotatedlist cmake-harmonyos-build-properties
48
49
\section1 Variables
50
51
The following variables affect how the HAP is built:
52
53
\annotatedlist cmake-harmonyos-build-variables
54
*/
qtbase
src
corelib
doc
src
cmake
qt-for-harmonyos-cmake-api.qdoc
Generated on
for Qt by
1.16.1