From 87a6283fbb07b7aa5ba3dd4d6bcb581777dc4303 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Fri, 16 Aug 2019 12:57:31 +0200 Subject: [PATCH] Fix QT_WILL_BUILD_TOOLS evaluation This condition was not being properly evaluated since the cached variable was treated as a string. Any checks with if(QT_WILL_BUILD_TOOLS) would just verify whether the string was empty or not. Change-Id: Ie8b9ecc8249a1e9f5c0aa1b13d5bef686fcb04de Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 87c126459d..62c0d66561 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -2300,7 +2300,11 @@ endfunction() # Sets QT_WILL_BUILD_TOOLS if tools will be built. function(qt_check_if_tools_will_be_built) - set(will_build_tools NOT CMAKE_CROSSCOMPILING AND NOT QT_FORCE_FIND_TOOLS) + if(NOT CMAKE_CROSSCOMPILING AND NOT QT_FORCE_FIND_TOOLS) + set(will_build_tools TRUE) + else() + set(will_build_tools FALSE) + endif() set(QT_WILL_BUILD_TOOLS ${will_build_tools} CACHE INTERNAL "Are tools going to be built" FORCE) endfunction()