Consider '^Qt6' deps when generating pkg-config files

Dependencies that alredy start with QT_CMAKE_EXPORT_NAMESPACE shouldn't
be skipped but collected as is when generating pkg-config files.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-124135
Change-Id: I6875337c2e1d98f657e52a5fc2c37eebccf08b98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2024-04-05 11:01:24 +02:00
parent e820ff8301
commit 337cadbcb7

View File

@ -74,7 +74,7 @@ function(qt_internal_generate_pkg_config_file module)
foreach(dep IN LISTS loose_target_requires) foreach(dep IN LISTS loose_target_requires)
if(dep MATCHES "^Qt::") if(dep MATCHES "^Qt::")
string(REGEX REPLACE "Qt" "${QT_CMAKE_EXPORT_NAMESPACE}" dep ${dep}) string(REGEX REPLACE "Qt" "${QT_CMAKE_EXPORT_NAMESPACE}" dep ${dep})
else() elseif(NOT dep MATCHES "^${QT_CMAKE_EXPORT_NAMESPACE}::")
# TODO: Figure out a way to get non-Qt requirements PkgConfig files. # TODO: Figure out a way to get non-Qt requirements PkgConfig files.
continue() continue()
endif() endif()