43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From eff776c676b042bd75604105a3876f999b9808d5 Mon Sep 17 00:00:00 2001
|
|
From: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
Date: Mon, 23 Dec 2024 12:47:21 +0100
|
|
Subject: [PATCH] CMake: Fix find_package call in Qt6QmlFindQmlscInternal.cmake
|
|
|
|
Qt6QmlFindQmlscInternal.cmake tries to find the
|
|
Qt6QmlCompilerPlusPrivateTools package and specifies a version. That
|
|
version was PROJECT_VERSION, which is the version of the user project.
|
|
It should be the Qt's version instead.
|
|
|
|
Read the package version of the Qt6::Qml target and use that in the
|
|
find_package call. The target is guaranteed to exist, because the
|
|
Qt6QmlFindQmlscInternal.cmake inclusion is guarded by a check for this
|
|
target.
|
|
|
|
This amends commit b0f1ec4e394dcee82400964225be485a7cdd3c53.
|
|
|
|
Pick-to: 6.8 6.9
|
|
Fixes: QTBUG-132421
|
|
Change-Id: I04402296b351ef8df991ade697c633594b0b17b5
|
|
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
---
|
|
src/qml/Qt6QmlFindQmlscInternal.cmake | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/qml/Qt6QmlFindQmlscInternal.cmake b/src/qml/Qt6QmlFindQmlscInternal.cmake
|
|
index f02103f45f..3f549c7cbe 100644
|
|
--- a/src/qml/Qt6QmlFindQmlscInternal.cmake
|
|
+++ b/src/qml/Qt6QmlFindQmlscInternal.cmake
|
|
@@ -30,7 +30,8 @@ endif()
|
|
|
|
# This can't use the find_package(Qt6 COMPONENTS) signature, because Qt6Config uses NO_DEFAULT and
|
|
# won't look at the prepended extra find root paths.
|
|
-find_package(Qt6QmlCompilerPlusPrivateTools ${PROJECT_VERSION} QUIET CONFIG
|
|
+get_target_property(_qt_qml_package_version Qt6::Qml _qt_package_version)
|
|
+find_package(Qt6QmlCompilerPlusPrivateTools ${_qt_qml_package_version} QUIET CONFIG
|
|
PATHS
|
|
${_qt_additional_host_packages_prefix_paths}
|
|
)
|
|
--
|
|
2.47.1
|
|
|