diff options
author | Li Xinwei <1326710505@qq.com> | 2021-07-23 15:37:14 +0800 |
---|---|---|
committer | Li Xinwei <1326710505@qq.com> | 2021-07-26 16:35:37 +0800 |
commit | c230fa69d37c3f57c0e874c059d0f0a4579e9ec3 (patch) | |
tree | 0814b86a928b6f5ad9461d6d2edc1611c311c88f /cmake/QtPluginDependencies.cmake.in | |
parent | bb6c9b368c4cc18d0ac4b6ee75275743e03d1169 (diff) |
CMake: Use namespaced variables in Qt6*Dependencies.cmake
Change-Id: I166988020cfd9750a4d58e519742215d0c03ad3e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit bd594f945773f713ca493fd7b040fde8a12bdf87)
Diffstat (limited to 'cmake/QtPluginDependencies.cmake.in')
-rw-r--r-- | cmake/QtPluginDependencies.cmake.in | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in index 62eda2c5c0..8473a89a1b 100644 --- a/cmake/QtPluginDependencies.cmake.in +++ b/cmake/QtPluginDependencies.cmake.in @@ -1,34 +1,34 @@ 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@") +set(__qt_@target@_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}") +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(components) - string(REPLACE " " ";" components "${components}") - list(APPEND find_package_args COMPONENTS ${components}) + 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(optional_components) - string(REPLACE " " ";" optional_components "${optional_components}") - list(APPEND find_package_args OPTIONAL_COMPONENTS ${optional_components}) + 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(is_optional) + if(__qt_@target@_is_optional) if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) - list(APPEND find_package_args QUIET) + list(APPEND __qt_@target@_find_package_args QUIET) endif() - find_package(${find_package_args}) + find_package(${__qt_@target@_find_package_args}) else() - find_dependency(${find_package_args}) + find_dependency(${__qt_@target@_find_package_args}) endif() endforeach() @@ -38,13 +38,13 @@ if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES) endif() # 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) +set(__qt_@target@_target_deps "@target_deps@") +foreach(__qt_@target@_target_dep ${__qt_@target@_target_deps}) + list(GET __qt_@target@_target_dep 0 __qt_@target@_pkg) + list(GET __qt_@target@_target_dep 1 __qt_@target@_version) - if (NOT ${pkg}_FOUND) - find_dependency(${pkg} ${version} + if (NOT ${__qt_@target@_pkg}_FOUND) + find_dependency(${__qt_@target@_pkg} ${__qt_@target@_version} PATHS @find_dependency_paths@ ${_qt_additional_packages_prefix_path} |