summaryrefslogtreecommitdiffstats
path: root/cmake/QtConfig.cmake.in
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-09-11 13:41:39 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-09-12 19:26:52 +0200
commit58c1c6ee5c986d502b56eb1cc57f1d9444d42031 (patch)
tree19689d29d176e78ee7fb0fcc3f77b3b225d6baca /cmake/QtConfig.cmake.in
parent55687924e3cc40b1ffc5a9038bb7e37d1ed6a19c (diff)
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtConfig.cmake.in')
-rw-r--r--cmake/QtConfig.cmake.in2
1 files changed, 1 insertions, 1 deletions
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()