aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-01-06 10:41:05 +0100
committerAndrei Golubev <andrei.golubev@qt.io>2022-01-27 11:29:42 +0100
commitbe3f352c3391421d7e4836b23568b7ee85a425cd (patch)
tree2ed1489da170ff39ea85f4427b165e7d04e42510 /src
parent14e764dc331f0d5e2361cc69e3912b716b144ab8 (diff)
qmltc: Do not search for qmltypes in non-TARGET libs
If we haven't built the library ourselves, we can't find its qmltypes this way. Change-Id: I2dba9cfa7a3574df5a34a6cfbd5d34aae9515171 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 0d799cc0ddf851c64c15441f4774784e3179d1f2) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/Qt6QmlMacros.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake
index 1ef71bded0..d9bbf246c8 100644
--- a/src/qml/Qt6QmlMacros.cmake
+++ b/src/qml/Qt6QmlMacros.cmake
@@ -1090,6 +1090,10 @@ function(qt6_target_compile_qml_to_cpp target)
get_target_property(potential_qml_modules ${target} LINK_LIBRARIES)
foreach(lib ${potential_qml_modules})
+ if(NOT TARGET ${lib})
+ continue()
+ endif()
+
# get any QT_QML_MODULE_ property, this way we can tell whether we deal
# with QML module target or not. use output dir as it's used later
get_target_property(external_output_dir ${lib} QT_QML_MODULE_OUTPUT_DIRECTORY)