1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qt-cmake-policy-qtp0002.html
6\ingroup qt-cmake-policies
9\keyword qt_cmake_policy_qtp0002
11\summary {Target properties that specify Android-specific paths may contain generator expressions.}
13This policy was introduced in Qt 6.6. It changes the processing of target
14properties that specify Android-specific paths:
16 \li \l QT_QML_IMPORT_PATH
17 \li \l QT_QML_ROOT_PATH
18 \li \l QT_ANDROID_PACKAGE_SOURCE_DIR
19 \li \l QT_ANDROID_EXTRA_PLUGINS
20 \li \l QT_ANDROID_EXTRA_LIBS
23The \c OLD behavior of this policy doesn't allow generator expressions in the
24target properties that specify Android-specific paths but implicitly converts
25the specified paths to valid JSON strings.
27The \c NEW behavior of this policy allows using generator expressions in the
28target properties that specify Android-specific paths, but they must evaluate to
31The following value of the \l QT_ANDROID_EXTRA_PLUGINS property is converted to
32a valid JSON string if you set the policy to OLD, but leads to an error if the
36 QT_ANDROID_EXTRA_PLUGINS "\\path\\to\\MyPlugin.so"
39If the policy is set to NEW for the above example, the resulting JSON string in
40the deployment settings file will contain escaped symbols instead of path
43Generator expressions are only supported if the policy is set to NEW, so the
44OLD behavior generates a malformed deployment settings file with the following
48 QT_ANDROID_EXTRA_PLUGINS "$<TARGET_FILE_DIR:MyPlugin>"
52This property value works as expected with both OLD and NEW policy values:
55 QT_ANDROID_EXTRA_PLUGINS "/path/to/MyPlugin.so"
59\qtpolicydeprecatedbehavior
61\sa qt_policy, {Qt CMake policies}