summaryrefslogtreecommitdiff
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-07 13:18:14 -0500
committerBrad King <brad.king@kitware.com>2021-01-07 13:19:48 -0500
commitd391d05e3a60baa1187071b1ce0246cab60d4e2e (patch)
tree3fda00489e4045e07f2ecad50da13766bef9d634 /Source/QtDialog
parent05f4248e3d89bf9d779140cf60f511126756ab02 (diff)
downloadcmake-d391d05e3a60baa1187071b1ce0246cab60d4e2e.tar.gz
cmake-gui: Fix CMake_QT_MAJOR_VERSION string comparison
Fix the string comparison added by commit 2e4cbaa521 (cmake-gui: Add a Qt version control variable, 2020-12-28). The version-based comparison is not meant for arbitrary strings.
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 1d3c66e76b..af4a798537 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -13,7 +13,7 @@ set(CMake_QT_MAJOR_VERSION "A" CACHE
STRING "Expected Qt major version. Valid values are A (auto-select), 5, 6.")
set(SUPPORTED_QT_VERSIONS "A" 5 6)
set_property(CACHE CMake_QT_MAJOR_VERSION PROPERTY STRINGS ${SUPPORTED_QT_VERSIONS})
-if(NOT CMake_QT_MAJOR_VERSION VERSION_EQUAL "A")
+if(NOT CMake_QT_MAJOR_VERSION STREQUAL "A")
if(NOT CMake_QT_MAJOR_VERSION IN_LIST SUPPORTED_QT_VERSIONS)
message(FATAL_ERROR "Supported Qt versions are \"${SUPPORTED_QT_VERSIONS}\"."
" But CMake_QT_MAJOR_VERSION is set to ${CMake_QT_MAJOR_VERSION}.")