diff options
Diffstat (limited to 'cmake/QtConfigDependencies.cmake.in')
-rw-r--r-- | cmake/QtConfigDependencies.cmake.in | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/cmake/QtConfigDependencies.cmake.in b/cmake/QtConfigDependencies.cmake.in index 159d3c020c..b23b6681eb 100644 --- a/cmake/QtConfigDependencies.cmake.in +++ b/cmake/QtConfigDependencies.cmake.in @@ -1,50 +1,49 @@ set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_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_third_party_deps "@third_party_deps@") @third_party_extra@ -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_dep ${__qt_third_party_deps}) + list(GET __qt_target_dep 0 __qt_pkg) + list(GET __qt_target_dep 1 __qt_is_optional) + list(GET __qt_target_dep 2 __qt_version) + list(GET __qt_target_dep 3 __qt_components) + list(GET __qt_target_dep 4 __qt_optional_components) + set(__qt_find_package_args "${__qt_pkg}") + if(__qt_version) + list(APPEND __qt_find_package_args "${__qt_version}") endif() - if(components) - string(REPLACE " " ";" components "${components}") - list(APPEND find_package_args COMPONENTS ${components}) + if(__qt_components) + string(REPLACE " " ";" __qt_components "${__qt_components}") + list(APPEND __qt_find_package_args COMPONENTS ${__qt_components}) endif() - if(optional_components) - string(REPLACE " " ";" optional_components "${optional_components}") - list(APPEND find_package_args OPTIONAL_COMPONENTS ${optional_components}) + if(__qt_optional_components) + string(REPLACE " " ";" __qt_optional_components "${__qt_optional_components}") + list(APPEND __qt_find_package_args OPTIONAL_COMPONENTS ${__qt_optional_components}) endif() # Already build an error message, because find_dependency calls return() on failure. - set(__@INSTALL_CMAKE_NAMESPACE@_message "\nPackage: ${pkg}") - if(version) - string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nVersion: ${version}") + set(__qt_message "\nPackage: ${__qt_pkg}") + if(__qt_version) + string(APPEND __qt_message "\nVersion: ${__qt_version}") endif() - if(components) - string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nComponents: ${components}") + if(__qt_components) + string(APPEND __qt_message "\nComponents: ${__qt_components}") endif() - if(optional_components) - string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nComponents: ${optional_components}") + if(__qt_optional_components) + string(APPEND __qt_message "\nComponents: ${__qt_optional_components}") endif() - set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE - "${__@INSTALL_CMAKE_NAMESPACE@_message}") + set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE "${__qt_message}") - if(is_optional) + if(__qt_is_optional) if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) - list(APPEND find_package_args QUIET) + list(APPEND __qt_find_package_args QUIET) endif() - find_package(${find_package_args}) + find_package(${__qt_find_package_args}) else() - find_dependency(${find_package_args}) + find_dependency(${__qt_find_package_args}) endif() endforeach() |