summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <[email protected]>2024-06-10 13:36:32 +0200
committerAlexandru Croitor <[email protected]>2024-06-13 16:54:47 +0200
commit0be79f14865c0a19fde0abad7d1722f0bac3b7c2 (patch)
treefefb28046625a74b5972a1261dfaa9a5457328d3
parent70475a652a9a44651c25126f6615770e8b43ca1b (diff)
CMake: Assign FindWrapFoo_VERSION variable in QtFindWrapHelper.cmake
The QtFindWrapHelper.cmake file retrieves the version of the underlying system package version or bundled package version, and passes that to find_package_handle_standard_args to show which version was found. But it did not set a ${PACKAGE_NAME}_VERSION variable, which means we didn't record the version in qt_find_package, and thus in the final SBOM. Make sure we set the variable. Amends 7ad8c347feb5e336c3833d6d3ac021a0a14b714a Pick-to: 6.8 Change-Id: Ia0d5b895de36017949e6607d17093459dca302b3 Reviewed-by: Alexey Edelev <[email protected]>
-rw-r--r--cmake/QtFindWrapHelper.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/QtFindWrapHelper.cmake b/cmake/QtFindWrapHelper.cmake
index b17f2133bba..506bfc7fadb 100644
--- a/cmake/QtFindWrapHelper.cmake
+++ b/cmake/QtFindWrapHelper.cmake
@@ -102,8 +102,11 @@ macro(qt_find_package_system_or_bundled _unique_prefix)
endif()
if(_qfwrap_${_unique_prefix}_package_version)
+ set(Wrap${_qfwrap_${_unique_prefix}_FRIENDLY_PACKAGE_NAME}_VERSION
+ "${_qfwrap_${_unique_prefix}_package_version}"
+ )
set(_qfwrap_${_unique_prefix}_package_version_option
- VERSION_VAR "_qfwrap_${_unique_prefix}_package_version"
+ VERSION_VAR "Wrap${_qfwrap_${_unique_prefix}_FRIENDLY_PACKAGE_NAME}_VERSION"
)
endif()