summaryrefslogtreecommitdiffstats
path: root/cmake/QtPluginDependencies.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtPluginDependencies.cmake.in')
-rw-r--r--cmake/QtPluginDependencies.cmake.in36
1 files changed, 6 insertions, 30 deletions
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in
index 81b66837f0..bcbb9bb5db 100644
--- a/cmake/QtPluginDependencies.cmake.in
+++ b/cmake/QtPluginDependencies.cmake.in
@@ -1,36 +1,11 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
set(@target@_FOUND FALSE)
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
set(__qt_@target@_third_party_deps "@third_party_deps@")
-
-foreach(__qt_@target@_target_dep ${__qt_@target@_third_party_deps})
- list(GET __qt_@target@_target_dep 0 __qt_@target@_pkg)
- list(GET __qt_@target@_target_dep 1 __qt_@target@_is_optional)
- list(GET __qt_@target@_target_dep 2 __qt_@target@_version)
- list(GET __qt_@target@_target_dep 3 __qt_@target@_components)
- list(GET __qt_@target@_target_dep 4 __qt_@target@_optional_components)
- set(__qt_@target@_find_package_args "${__qt_@target@_pkg}")
- if(__qt_@target@_version)
- list(APPEND __qt_@target@_find_package_args "${__qt_@target@_version}")
- endif()
- if(__qt_@target@_components)
- string(REPLACE " " ";" __qt_@target@_components "${__qt_@target@_components}")
- list(APPEND __qt_@target@_find_package_args COMPONENTS ${__qt_@target@_components})
- endif()
- if(__qt_@target@_optional_components)
- string(REPLACE " " ";" __qt_@target@_optional_components "${__qt_@target@_optional_components}")
- list(APPEND __qt_@target@_find_package_args OPTIONAL_COMPONENTS ${__qt_@target@_optional_components})
- endif()
-
- if(__qt_@target@_is_optional)
- if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- list(APPEND __qt_@target@_find_package_args QUIET)
- endif()
- find_package(${__qt_@target@_find_package_args})
- else()
- find_dependency(${__qt_@target@_find_package_args})
- endif()
-endforeach()
+_qt_internal_find_third_party_dependencies("@target@" __qt_@target@_third_party_deps)
set(__qt_use_no_default_path_for_qt_packages "NO_DEFAULT_PATH")
if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES)
@@ -40,6 +15,7 @@ endif()
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
set(__qt_@target@_target_deps "@target_deps@")
set(__qt_@target@_find_dependency_paths "@find_dependency_paths@")
-_qt_internal_find_dependencies(__qt_@target@_target_deps __qt_@target@_find_dependency_paths)
+_qt_internal_find_qt_dependencies("@target@" __qt_@target@_target_deps
+ __qt_@target@_find_dependency_paths)
set(@target@_FOUND TRUE)