summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/qt.toolchain.cmake.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in
index d5fc183c74..5e9acd66b8 100644
--- a/cmake/qt.toolchain.cmake.in
+++ b/cmake/qt.toolchain.cmake.in
@@ -197,9 +197,9 @@ if(__qt_toolchain_host_path_required AND
endif()
# Compile tests only see a restricted set of variables.
-# All cache variables, this toolchain file uses, must be made available to compile tests,
-# because this toolchain file will be included there too.
-if(NOT ENV{_QT_TOOLCHAIN_VARS_INITIALIZED})
+# All cache variables, this toolchain file uses, must be made available to project-based
+# try_compile tests because this toolchain file will be included there too.
+if(NOT "$ENV{_QT_TOOLCHAIN_VARS_INITIALIZED}")
set(ENV{_QT_TOOLCHAIN_VARS_INITIALIZED} ON)
foreach(var ${__qt_toolchain_used_variables})
set(ENV{_QT_TOOLCHAIN_${var}} "${${var}}")