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{qt6_add_executable}{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 metadata commands below mirror this split, so
27
there is one command for each scope.
28
29
\section1 Commands
30
31
\list
32
\li \l{qt6_set_harmonyos_app_metadata}{qt_set_harmonyos_app_metadata()} sets
33
application-level metadata, such as the vendor, version, label, and icon.
34
\li \l{qt6_set_harmonyos_module_metadata}{qt_set_harmonyos_module_metadata()}
35
sets module-level metadata, such as the description, device types, and
36
orientation.
37
\li \l{qt6_add_harmonyos_permission}{qt_add_harmonyos_permission()} adds a
38
HarmonyOS permission to the application.
39
\endlist
40
41
\section1 Target Properties
42
43
The following target properties affect how the HAP is built:
44
45
\annotatedlist cmake-harmonyos-build-properties
46
47
\section1 Variables
48
49
The following variables affect how the HAP is built:
50
51
\annotatedlist cmake-harmonyos-build-variables
52
*/
qtbase
src
corelib
doc
src
cmake
qt-for-harmonyos-cmake-api.qdoc
Generated on
for Qt by
1.16.1