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 <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2019-08-16 12:57:31 +02:00
parent 37f82b8a97
commit 87a6283fbb
1 changed files with 5 additions and 1 deletions

View File

@ -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()