diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-13 12:16:34 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-13 12:21:01 +0200 |
commit | 6e1a570dc8560489d10120cbd019a665f33f49c2 (patch) | |
tree | 3807da6cfea34ee1893b91cadb0a2342039d27cb /cmake | |
parent | b0c51f86f40b6b6d18fe2bb75cc851d36395240d (diff) |
Revert "CMake: Reduce the number of find_dependency calls"
This reverts commit a3cb002511d7e2cc73234611795c1947620aedd5.
This lead to configuration errors on some machines, blocking
development.
Change-Id: Ibb785c96c7d85692a6e22a73e086119eb571df71
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtConfigDependencies.cmake.in | 11 | ||||
-rw-r--r-- | cmake/QtModuleDependencies.cmake.in | 7 | ||||
-rw-r--r-- | cmake/QtPluginDependencies.cmake.in | 7 |
3 files changed, 14 insertions, 11 deletions
diff --git a/cmake/QtConfigDependencies.cmake.in b/cmake/QtConfigDependencies.cmake.in index 49e08b7ba6..e16d725928 100644 --- a/cmake/QtConfigDependencies.cmake.in +++ b/cmake/QtConfigDependencies.cmake.in @@ -11,10 +11,6 @@ foreach(_target_dep ${_third_party_deps}) if(version) list(APPEND find_package_args "${version}") endif() - if(components) - string(REPLACE " " ";" components "${components}") - list(APPEND find_package_args COMPONENTS ${components}) - endif() # Already build an error message, because find_dependency calls return() on failure. set(__@INSTALL_CMAKE_NAMESPACE@_message "\nPackage: ${pkg}") @@ -27,7 +23,12 @@ foreach(_target_dep ${_third_party_deps}) set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE "${__@INSTALL_CMAKE_NAMESPACE@_message}") - find_dependency(${find_package_args}) + if(components) + string(REPLACE " " ";" components "${components}") + find_dependency(${find_package_args} COMPONENTS ${components}) + else() + find_dependency(${find_package_args}) + endif() endforeach() set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND TRUE) diff --git a/cmake/QtModuleDependencies.cmake.in b/cmake/QtModuleDependencies.cmake.in index 3d19fac784..80c5202c9a 100644 --- a/cmake/QtModuleDependencies.cmake.in +++ b/cmake/QtModuleDependencies.cmake.in @@ -15,12 +15,13 @@ foreach(_target_dep ${_third_party_deps}) if(version) list(APPEND find_package_args "${version}") endif() + if(components) string(REPLACE " " ";" components "${components}") - list(APPEND find_package_args COMPONENTS ${components}) + find_dependency(${find_package_args} COMPONENTS ${components}) + else() + find_dependency(${find_package_args}) endif() - - find_dependency(${find_package_args}) endforeach() # Find Qt tool package. diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in index bae6d85c7b..ce64b096bb 100644 --- a/cmake/QtPluginDependencies.cmake.in +++ b/cmake/QtPluginDependencies.cmake.in @@ -11,12 +11,13 @@ foreach(_target_dep ${_third_party_deps}) if(version) list(APPEND find_package_args "${version}") endif() + if(components) string(REPLACE " " ";" components "${components}") - list(APPEND find_package_args COMPONENTS ${components}) + find_dependency(${find_package_args} COMPONENTS ${components}) + else() + find_dependency(${find_package_args}) endif() - - find_dependency(${find_package_args}) endforeach() # note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0" |