diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-06-17 16:18:59 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2021-06-19 14:04:37 +0200 |
commit | ff4244b540e38c31a474ac23dc1b1696f35730ea (patch) | |
tree | 6d0ea68b83e5e4b37b3011c325b947cbdbb7a485 /cmake/QtPluginDependencies.cmake.in | |
parent | cdbb390c4a9b8d53cfcfd0884e6720423ce5e126 (diff) |
Move dependency lookup functionality to the common macro
Dependency lookup mechanism is the same for modules and plugins. It
makes sense to wrap it using macro.
Pick-to: 6.2
Change-Id: I73727743b0f5f40b2d94624f65ebfcf85e8dcc59
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPluginDependencies.cmake.in')
-rw-r--r-- | cmake/QtPluginDependencies.cmake.in | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in index dfa642cc50..7dde52ba6a 100644 --- a/cmake/QtPluginDependencies.cmake.in +++ b/cmake/QtPluginDependencies.cmake.in @@ -37,31 +37,9 @@ if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES) set(__qt_use_no_default_path_for_qt_packages "") endif() -# TODO: The dependencies lookup mechanism is common for Modules and Plugins. -# It should be moved to the common public helper file. -# # note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0" -set(_target_deps "@target_deps@") -foreach(_target_dep ${_target_deps}) - list(GET _target_dep 0 pkg) - list(GET _target_dep 1 version) - - if (NOT ${pkg}_FOUND) - set(pkg_names ${pkg}) - if(pkg MATCHES "(.*)Private$") - set(pkg_names "${CMAKE_MATCH_1};${pkg}") - endif() - find_dependency(${pkg} ${version} - NAMES - ${pkg_names} - PATHS - @find_dependency_paths@ - ${_qt_additional_packages_prefix_path} - ${_qt_additional_packages_prefix_path_env} - ${QT_EXAMPLES_CMAKE_PREFIX_PATH} - ${__qt_use_no_default_path_for_qt_packages} - ) - endif() -endforeach() +set(_@target@_target_deps "@target_deps@") +set(_@target@_find_dependency_paths "@find_dependency_paths@") +_qt_internal_find_dependencies(_@target@_target_deps _@target@_find_dependency_paths) set(@target@_FOUND TRUE) |