From a3cb002511d7e2cc73234611795c1947620aedd5 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 11 Sep 2020 13:55:13 +0200 Subject: CMake: Reduce the number of find_dependency calls ...in code. The actual number of calls at runtime does not change. The reason for this stunt is that we want to replace find_dependency with find_package at runtime for optional dependencies, and this will reduce the diff size of the next commit. Change-Id: I304fdf09c69fea7b6d4adabf515712eb097f8c86 Reviewed-by: Alexandru Croitor --- cmake/QtModuleDependencies.cmake.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmake/QtModuleDependencies.cmake.in') diff --git a/cmake/QtModuleDependencies.cmake.in b/cmake/QtModuleDependencies.cmake.in index 80c5202c9a..3d19fac784 100644 --- a/cmake/QtModuleDependencies.cmake.in +++ b/cmake/QtModuleDependencies.cmake.in @@ -15,13 +15,12 @@ foreach(_target_dep ${_third_party_deps}) if(version) list(APPEND find_package_args "${version}") endif() - if(components) string(REPLACE " " ";" components "${components}") - find_dependency(${find_package_args} COMPONENTS ${components}) - else() - find_dependency(${find_package_args}) + list(APPEND find_package_args COMPONENTS ${components}) endif() + + find_dependency(${find_package_args}) endforeach() # Find Qt tool package. -- cgit v1.2.3