aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-06-16 19:17:56 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-17 15:02:15 +0000
commit33557577df803df2c9807b731c4a9ddfdc50a01c (patch)
tree93fbe81a404cf9259f15aeade2bade5f36cb4ebc
parentec5c7063c5443709aca57203dba57b6aeafa597c (diff)
CMake: Check that android qml import paths are not empty
We should check that native_qml_import_paths does not contain -NOTFOUND before trying to add the qml output directory as an import path. Amends ef8bd8544752d966a575cc9f0e16f4ddab8dbecc Amends d05da5f306c7c30616d33fe540e64dd2fee46924 Task-number: QTBUG-102595 Change-Id: I884ecac3aa1bce77682bf74f22c892eadf310e07 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 1fb4a40b346b1767b3d0f472d101663c14e5d3b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/Qt6AndroidQmlMacros.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/Qt6AndroidQmlMacros.cmake b/src/qml/Qt6AndroidQmlMacros.cmake
index df25285462..e6ae1d8730 100644
--- a/src/qml/Qt6AndroidQmlMacros.cmake
+++ b/src/qml/Qt6AndroidQmlMacros.cmake
@@ -31,7 +31,11 @@ function(_qt_internal_generate_android_qml_deployment_settings out_var target)
# over other qml import paths. By default QT_QML_OUTPUT_DIRECTORY is set to
# ${CMAKE_BINARY_DIR}/android-qml for Android.
get_target_property(native_qml_import_paths "${target}" _qt_native_qml_import_paths)
- list(PREPEND native_qml_import_paths "${QT_QML_OUTPUT_DIRECTORY}")
+ if(native_qml_import_paths)
+ list(PREPEND native_qml_import_paths "${QT_QML_OUTPUT_DIRECTORY}")
+ else()
+ set(native_qml_import_paths "${QT_QML_OUTPUT_DIRECTORY}")
+ endif()
set_property(TARGET "${target}" PROPERTY
"_qt_native_qml_import_paths" "${native_qml_import_paths}")
endif()