diff options
Diffstat (limited to 'cmake/QtPluginDependencies.cmake.in')
-rw-r--r-- | cmake/QtPluginDependencies.cmake.in | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in index 7dde52ba6a..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(_third_party_deps "@third_party_deps@") - -foreach(_target_dep ${_third_party_deps}) - list(GET _target_dep 0 pkg) - list(GET _target_dep 1 is_optional) - list(GET _target_dep 2 version) - list(GET _target_dep 3 components) - list(GET _target_dep 4 optional_components) - set(find_package_args "${pkg}") - if(version) - list(APPEND find_package_args "${version}") - endif() - if(components) - string(REPLACE " " ";" components "${components}") - list(APPEND find_package_args COMPONENTS ${components}) - endif() - if(optional_components) - string(REPLACE " " ";" optional_components "${optional_components}") - list(APPEND find_package_args OPTIONAL_COMPONENTS ${optional_components}) - endif() - - if(is_optional) - if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) - list(APPEND find_package_args QUIET) - endif() - find_package(${find_package_args}) - else() - find_dependency(${find_package_args}) - endif() -endforeach() +set(__qt_@target@_third_party_deps "@third_party_deps@") +_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) @@ -38,8 +13,9 @@ if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES) endif() # note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0" -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(__qt_@target@_target_deps "@target_deps@") +set(__qt_@target@_find_dependency_paths "@find_dependency_paths@") +_qt_internal_find_qt_dependencies("@target@" __qt_@target@_target_deps + __qt_@target@_find_dependency_paths) set(@target@_FOUND TRUE) |