From 71190238298c6dd17f8841678d3a058c3008fe20 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 14 Oct 2019 15:49:07 +0200 Subject: Always try to find dependencies for plugins Generated plugin CMake files should always try to call find_dependency, especially in static builds. pkg_check_modules sets a cache value for foo_FOUND instead of a directory scope foo_FOUND, which means that find_dependency will not be called in another scope, and thus fail to create needed imported targets. Note this makes the code be the same as in ModuleDependencies.cmake.in. Change-Id: I0b58b038afcb72cb27d0b433371bc9cb5e4bfec9 Reviewed-by: Simon Hausmann --- cmake/QtPluginDependencies.cmake.in | 2 -- 1 file changed, 2 deletions(-) (limited to 'cmake/QtPluginDependencies.cmake.in') diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in index 5be4a8ca3e..f25d0bed43 100644 --- a/cmake/QtPluginDependencies.cmake.in +++ b/cmake/QtPluginDependencies.cmake.in @@ -10,14 +10,12 @@ foreach(_target_dep ${_third_party_deps}) list(APPEND find_package_args "${version}") endif() - if (NOT ${pkg}_FOUND) if(components) string(REPLACE " " ";" components "${components}") find_dependency(${find_package_args} COMPONENTS ${components}) else() find_dependency(${find_package_args}) endif() - endif() if (NOT ${pkg}_FOUND) set(@target@_FOUND FALSE) -- cgit v1.2.3