Update QtUtils.cmake

This commit is contained in:
恍兮惚兮 2024-02-28 14:42:28 +08:00
parent 71a22be841
commit a512437f1b

View File

@ -14,6 +14,10 @@ macro(msvc_registry_search)
# assume the latest version will be last alphabetically # assume the latest version will be last alphabetically
list(REVERSE QT_VERSIONS) list(REVERSE QT_VERSIONS)
list(LENGTH QT_VERSIONS QT_VERSIONS_LENGTH)
if(${QT_VERSIONS_LENGTH} EQUAL 0)
message(WARNING "Required QT5 toolchain is not installed")
else()
list(GET QT_VERSIONS 0 QT_VERSION) list(GET QT_VERSIONS 0 QT_VERSION)
# fix any double slashes which seem to be common # fix any double slashes which seem to be common
@ -48,6 +52,8 @@ macro(msvc_registry_search)
endif() endif()
endif() endif()
endif() endif()
endif()
endmacro() endmacro()
macro(find_qt5) macro(find_qt5)