From 58c1c6ee5c986d502b56eb1cc57f1d9444d42031 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 11 Sep 2020 13:41:39 +0200 Subject: CMake: Fix usage of find_dependency() The find_dependency() macro calls return() on failure, meaning any code after it will be ignored, thus checking any XXX_FOUND variables after find_dependency() is pointless. Fix the places where we use find_dependency() and set the "failed" state before the call and the "success" state afterwards. Change-Id: Ia5239c704f02a9bec972210374ffed7808b14055 Reviewed-by: Alexandru Croitor --- cmake/QtConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/QtConfig.cmake.in') diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in index 46a5d11ff7..b434665650 100644 --- a/cmake/QtConfig.cmake.in +++ b/cmake/QtConfig.cmake.in @@ -51,7 +51,7 @@ endif() # Find required dependencies, if any. include(CMakeFindDependencyMacro) -set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND TRUE) +set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND FALSE) if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Dependencies.cmake") include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Dependencies.cmake") endif() -- cgit v1.2.3