Revert "Revert "CMake: Reduce the number of find_dependency calls""
This reverts commit 6e1a570dc8560489d10120cbd019a665f33f49c2. The build failure caused by 58c1c6ee5c986d502b56eb1cc57f1d9444d42031 has been fixed. Change-Id: I67acaa2d1dd5fc88c205b054252be2e6e26898c7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
165bc70bc3
commit
b96d350cff
@ -13,6 +13,10 @@ foreach(_target_dep ${_third_party_deps})
|
|||||||
if(version)
|
if(version)
|
||||||
list(APPEND find_package_args "${version}")
|
list(APPEND find_package_args "${version}")
|
||||||
endif()
|
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.
|
# Already build an error message, because find_dependency calls return() on failure.
|
||||||
set(__@INSTALL_CMAKE_NAMESPACE@_message "\nPackage: ${pkg}")
|
set(__@INSTALL_CMAKE_NAMESPACE@_message "\nPackage: ${pkg}")
|
||||||
@ -25,12 +29,7 @@ foreach(_target_dep ${_third_party_deps})
|
|||||||
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE
|
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE
|
||||||
"${__@INSTALL_CMAKE_NAMESPACE@_message}")
|
"${__@INSTALL_CMAKE_NAMESPACE@_message}")
|
||||||
|
|
||||||
if(components)
|
|
||||||
string(REPLACE " " ";" components "${components}")
|
|
||||||
find_dependency(${find_package_args} COMPONENTS ${components})
|
|
||||||
else()
|
|
||||||
find_dependency(${find_package_args})
|
find_dependency(${find_package_args})
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND TRUE)
|
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND TRUE)
|
||||||
|
@ -15,13 +15,12 @@ foreach(_target_dep ${_third_party_deps})
|
|||||||
if(version)
|
if(version)
|
||||||
list(APPEND find_package_args "${version}")
|
list(APPEND find_package_args "${version}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(components)
|
if(components)
|
||||||
string(REPLACE " " ";" components "${components}")
|
string(REPLACE " " ";" components "${components}")
|
||||||
find_dependency(${find_package_args} COMPONENTS ${components})
|
list(APPEND find_package_args COMPONENTS ${components})
|
||||||
else()
|
|
||||||
find_dependency(${find_package_args})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_dependency(${find_package_args})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Find Qt tool package.
|
# Find Qt tool package.
|
||||||
|
@ -11,13 +11,12 @@ foreach(_target_dep ${_third_party_deps})
|
|||||||
if(version)
|
if(version)
|
||||||
list(APPEND find_package_args "${version}")
|
list(APPEND find_package_args "${version}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(components)
|
if(components)
|
||||||
string(REPLACE " " ";" components "${components}")
|
string(REPLACE " " ";" components "${components}")
|
||||||
find_dependency(${find_package_args} COMPONENTS ${components})
|
list(APPEND find_package_args COMPONENTS ${components})
|
||||||
else()
|
|
||||||
find_dependency(${find_package_args})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_dependency(${find_package_args})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
|
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user