forked from qt-creator/qt-creator
QmlDesigner: Show error message if Qt is less than Qt 6.2 in template
The cmake application template requires Qt 6.2 or higher. Otherwise we show an error message. Task-number: QDS-8110 Change-Id: Ib22edae8634727e17edf2bb19594549bd81a49b4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -10,6 +10,11 @@ set(CMAKE_AUTOMOC ON)
|
||||
find_package(QT NAMES Qt6 COMPONENTS Gui Qml Quick)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Qml Quick)
|
||||
|
||||
# To build this application you need Qt 6.2.0 or higher
|
||||
if (Qt6_VERSION VERSION_LESS 6.2.0)
|
||||
message(FATAL_ERROR "You need Qt 6.2.0 or newer to build the application.")
|
||||
endif()
|
||||
|
||||
qt_add_executable(${CMAKE_PROJECT_NAME} src/main.cpp)
|
||||
|
||||
# qt_standard_project_setup() requires Qt 6.3 or higher. See https://doc.qt.io/qt-6/qt-standard-project-setup.html for details.
|
||||
|
Reference in New Issue
Block a user