Adds an Android permission to the target executable.
The command is defined in the Core component of the Qt6 package, which can be loaded like so:
find_package(Qt6 REQUIRED COMPONENTS Core)
This command was introduced in Qt 6.9.
qt_add_android_permission(target NAME <permission-name> [ATTRIBUTES <name1> <value1> ...])
If versionless commands are disabled, use qt6_add_android_permission() instead. It supports the same set of arguments as this command.
The command adds an Android permission to the target executable. This can be used to define additional permissions, or overriding the default permissions set by Qt modules.
For further information on defining Android permissions, see Qt Permissions and Features.
qt_add_executable(myapp
// ...
)
qt_add_android_permission(myapp
NAME android.permission.BLUETOOTH_SCAN
ATTRIBUTES
minSdkVersion 31
usesPermissionFlags neverForLocation
)
qt_add_android_permission(myapp
NAME android.permission.ACCESS_COARSE_LOCATION
)
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qt-add-android-permission.html