qt5base-lts/cmake/QtModuleToolsDependencies.cmake.in
Joerg Bornemann b9c493728a Revert "Revert "CMake: Fix usage of find_dependency()""
...and fix the build errors the original change caused.
This reverts commit 127fb8bb55.

Change-Id: I4006b32734a51c5d101dd73c957f81d2a0f84ba1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-14 15:03:13 +02:00

14 lines
406 B
CMake

# Find "ModuleTools" dependencies, which are other ModuleTools packages.
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND FALSE)
set(_tool_deps "@package_deps@")
foreach(_target_dep ${_tool_deps})
list(GET _target_dep 0 pkg)
list(GET _target_dep 1 version)
if (NOT ${pkg}_FOUND)
find_dependency(${pkg} ${version})
endif()
endforeach()
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND TRUE)